Closed tanzislam closed 4 years ago
As an example, this reproduces if key
and initVector
are both "d4f34f04b75fe54fb641b38ffbcc14f6"
. In that case, the prefix in the decrypted cookie ended up having an extra ;
that wasn't matched by a =
before we get to the ;admin=true;
. This caused the key-value parser to treat the ;admin=true;
as part of a key name.
The fix is to inject another =
immediately before the ;admin=true;
to reset the parser state.
Example: https://travis-ci.org/github/tanzislam/cryptopals/jobs/679871545