I am trying to solve a challenge, and I suspect it has to do with PHP juggling, because I get this base64 encoded json cooke as a response {"User":"foo","MAC":"bar"}
BUG #2
The calculated MAC (i.e. the result of
hash_hmac()
) is a string containing hexadecimal charactersThe use of a loose comparison means that if an integer was provided in the JSON payload, the HMAC string will be juggled to a number
I think that with a MAC, for instance "ff6d0...5885d"
, the PHP juggling will be compared to int(6)
since it is the first numerical. My idea wat to POST with the base64 encoded json: {"User":"Admin","MAC":6}
But this didn't work... does the juggling only work with MAC's that start with a numerical?