Skip to content

Commit

Permalink
Validate empty target URI
Browse files Browse the repository at this point in the history
  • Loading branch information
maeb committed Oct 8, 2021
1 parent 96595fe commit 76d6060
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/sessioncontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ func (s *writeSessionContext) validateSession() error {
if s.meta.IpAddress == "" {
return errors.New("missing IP-address")
}
if len(s.meta.TargetUri) == 0 {
return errors.New("missing target URI")
}
collectionConfig, err := s.configCache.GetConfigObject(context.TODO(), s.meta.CollectionRef)
if err != nil {
return fmt.Errorf("failed to get collection config: %s", s.meta.GetCollectionRef().GetId())
Expand Down

0 comments on commit 76d6060

Please sign in to comment.