mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-11 23:43:29 -07:00
Merge pull request #332 from jzelinskie/jwt-escape-infohash
middleware/jwt: escape infohash when debugging
This commit is contained in:
@@ -175,7 +175,7 @@ func validateJWT(ih bittorrent.InfoHash, jwtBytes []byte, cfgIss, cfgAud string,
|
||||
if ihClaim, ok := claims.Get("infohash").(string); !ok || !validInfoHash(ihClaim, ih) {
|
||||
log.WithFields(log.Fields{
|
||||
"exists": ok,
|
||||
"request": ih,
|
||||
"request": url.QueryEscape(ih.String()),
|
||||
"claim": ihClaim,
|
||||
}).Debugln("unequal or missing infohash when validating JWT")
|
||||
return errors.New("claim \"infohash\" is invalid")
|
||||
|
||||
Reference in New Issue
Block a user