This is a feature request but also a bug on some systems.
On a fancy nginx infrastructure Bakery's cookies were getting lost after some requests. Lost or just unvalidated, unfortunately the exact fault was never found. But, base64 encoding the cookie value before it was sent and decoding before decrypting has fixed the problem.
Based on PHP comments about mcrypt it seems a good idea that this get into Bakery.
I'll provide this for 6.x-2.x and 7.x-2.x.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | Bakery-base64-1234462-d7.patch | 586 bytes | coltrane |
| #1 | Bakery-base64-1234462-d6.patch | 586 bytes | coltrane |
Comments
Comment #1
coltraneComment #2
gregglesInstead of "fault protection" how about "Base64 encode the encrypted text because the result may contain characters that are not stored consistently in cookies."
Comment #3
gregglesOtherwise, looks great to me.
Comment #4
coltraneThanks! Committed to Drupal 6 http://drupalcode.org/project/bakery.git/commit/bb68c5c
Comment #5
coltraneAnd to 7. http://drupalcode.org/project/bakery.git/commit/7fd37cd
Comment #6.0
(not verified) commentedtomato/tomato