auraphp/Aura.Session

CsrfToken Constructor mis-using Segment accessor method

Closed this issue · 3 comments

alc commented

Like the title says, when the CsrfToken constructor is checking for an existing csrf token value, it's written as if Segment defines a __get method, but Segment has a regular get() method instead.

As a result, every time $session->getCsrfToken() is called, the token fails to find it's previous value from the session, and generates a new one...so no value can ever pass a $token->isValid() check.

Thank you @alc for reporting.

Plese see the patch, which will resolve the issue.

Thanks

alc commented

Thanks guys for the quick fix. I've really enjoyed using the v2 packages so far. Cheers for all your hard work!

You are welcome 👍 and thanks for using aura. Please join google groups if you are not there https://groups.google.com/d/forum/auraphp .

Thank you