yar
Member
- Affected version
- 2.2.13
xf_user cookie has urlencoded comma value stored (i.e. 'n%2Cnnnnnnnnn...' instead of just 'n,nnnnnn....'), thus making /api/auth/from-session failing when passing that value as is.
I had to look through the /api source code in order to understand what is wrong and why it did not like my valid xf_user cookie.
Would expect API to do urldecode() of remember_cookie param on its own before running all the checks, otherwise it just fails in XF/Repository/UserRemember.php(36) at:
if (!$cookie || !is_string($cookie) || !strpos($cookie, ','))
-because there is no comma in the cookie, but '%2C'
thanks!
I had to look through the /api source code in order to understand what is wrong and why it did not like my valid xf_user cookie.
Would expect API to do urldecode() of remember_cookie param on its own before running all the checks, otherwise it just fails in XF/Repository/UserRemember.php(36) at:
if (!$cookie || !is_string($cookie) || !strpos($cookie, ','))
-because there is no comma in the cookie, but '%2C'
thanks!