Skip to content

Commit

Permalink
Merge pull request #10 from rarimo/fix/proof_validation
Browse files Browse the repository at this point in the history
Fix proof: pub signal validation and selector
  • Loading branch information
Zaptoss authored Jul 10, 2024
2 parents ee53d05 + 3d15ada commit 5ef45f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/config/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

const (
proofEventIDValue = "111186066134341633902189494613533900917417361106374681011849132651019822199"
proofSelectorValue = "219681"
proofSelectorValue = "236065"
maxIdentityCount = 1
documentTypeID = "ID"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/service/requests/verify_passport.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ func NewVerifyPassport(r *http.Request) (req resources.VerifyPassportRequest, er
val.When(verifyPassportPathRegexp.MatchString(r.URL.Path), val.Required),
val.When(joinProgramPathRegexp.MatchString(r.URL.Path), val.Nil)),
"data/attributes/proof/proof": val.Validate(proof.Proof, val.When(attr.Proof != nil, val.Required)),
"data/attributes/proof/pub_signals": val.Validate(proof.PubSignals, val.When(attr.Proof != nil, val.Required, val.Length(22, 22))),
"data/attributes/proof/pub_signals": val.Validate(proof.PubSignals, val.When(attr.Proof != nil, val.Required, val.Length(24, 24))),
}.Filter()
}

0 comments on commit 5ef45f9

Please sign in to comment.