Skip to content

Commit

Permalink
fix: auth check for char id comparison
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <[email protected]>
  • Loading branch information
galexrt committed Oct 5, 2024
1 parent 9481fa3 commit 1f3f5c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gen/go/proto/services/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ func (s *Server) ChooseCharacter(ctx context.Context, req *ChooseCharacterReques
}

// Make sure the user isn't sending us a different char ID than their own
if !strings.HasSuffix(*char.Identifier, ":"+claims.Subject) {
if !strings.HasSuffix(*char.Identifier, claims.Subject) {
s.logger.Error("user sent bad char!", zap.String("expected", *char.Identifier), zap.String("current", claims.Subject))
return nil, errorsauth.ErrUnableToChooseChar
}
Expand Down

0 comments on commit 1f3f5c0

Please sign in to comment.