You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by telnetsrl on 15 Jan 2016 14:26 UTC as Trac ticket #1490641
After upgrading my PHP (and forgetting to load the openssl module) very often instead of logging out correctly I get the CSRF warning message. It's pretty gross how I nailed it, but adding
echo ("ST $sess_tok<br>TK $token");
just before
if (empty($sess_id) || $token != $sess_tok) {
in program/lib/Roundcube/rcube.php
I was able to quickly understand why the comparison was failing:
ST Bla$=BlahBlahBlahBlahBla+=BlahBl
TK Bla$=BlahBlahBlahBlahBla =BlahBl
ST Bla_$Bla_BlahB*Blah&%Blah&BlahBl
TK Bla_$Bla_BlahB*Blah
Instead of auditing lots of lines of code seeking for a perfect encode/decode path, the most immediate fix is to generate random bytes that encode to themselves (or to load mod_openssl.so in php :)
Here is my proposed patch,
regards
Reported by telnetsrl on 15 Jan 2016 14:26 UTC as Trac ticket #1490641
After upgrading my PHP (and forgetting to load the openssl module) very often instead of logging out correctly I get the CSRF warning message. It's pretty gross how I nailed it, but adding
just before
in program/lib/Roundcube/rcube.php
I was able to quickly understand why the comparison was failing:
Instead of auditing lots of lines of code seeking for a perfect encode/decode path, the most immediate fix is to generate random bytes that encode to themselves (or to load mod_openssl.so in php :)
Here is my proposed patch,
regards
Keywords: csrf token urldecode openssl
Migrated-From: http://trac.roundcube.net/ticket/1490641
The text was updated successfully, but these errors were encountered: