Merge pull request #332 from jzelinskie/jwt-escape-infohash
middleware/jwt: escape infohash when debugging
This commit is contained in:
commit
3168f13b48
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
if ihClaim, ok := claims.Get("infohash").(string); !ok || !validInfoHash(ihClaim, ih) {
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"exists": ok,
|
"exists": ok,
|
||||||
"request": ih,
|
"request": url.QueryEscape(ih.String()),
|
||||||
"claim": ihClaim,
|
"claim": ihClaim,
|
||||||
}).Debugln("unequal or missing infohash when validating JWT")
|
}).Debugln("unequal or missing infohash when validating JWT")
|
||||||
return errors.New("claim \"infohash\" is invalid")
|
return errors.New("claim \"infohash\" is invalid")
|
||||||
|
|
Loading…
Reference in a new issue