Skip to content

Commit

Permalink
Merge branch 'main' into use-test-chain
Browse files Browse the repository at this point in the history
* main:
  Fix JSON unmarshalling issue in Validate method.
  • Loading branch information
rolandgroen committed Oct 14, 2024
2 parents 24ad916 + ef8021f commit 77551ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uzi_vc_validator/ura_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type JwtHeaderValues struct {

func (u UraValidatorImpl) Validate(jwtString string) error {
credential := &vc.VerifiableCredential{}
err := json.Unmarshal([]byte("\""+jwtString+"\""), credential)
err := json.Unmarshal([]byte(fmt.Sprintf("\"%s\"", jwtString)), credential)

Check failure

Code scanning / CodeQL

Potentially unsafe quoting Critical

If this
JSON value
contains a double quote, it could break out of the enclosing quotes.
if err != nil {
return err
}
Expand Down

0 comments on commit 77551ec

Please sign in to comment.