Skip to content

Return the token from setRememberToken without password - #929

Open
VolodymyrLinuxovich wants to merge 1 commit into
ESAPI:developfrom
VolodymyrLinuxovich:issue-928
Open

VolodymyrLinuxovich wants to merge 1 commit into
ESAPI:developfrom
VolodymyrLinuxovich:issue-928

Conversation

@VolodymyrLinuxovich

Copy link
Copy Markdown

Closes #928.

setRememberToken(request, response, maxAge, domain, path) added the cookie but returned rval, which was always "". It now returns cryptToken, same as the deprecated overload. On an IntegrityException it still returns null.

I also extended testSetRememberToken to check the returned token against the cookie value. The loop in that test stopped at the first cookie with the remember token name. That one is the expired cookie from killCookie(), so it now keeps the last match instead.

The new assertions fail on develop and pass with the change. HTTPUtilitiesTest and AuthenticatorTest pass, 38 tests.

The 5 argument setRememberToken set the cookie but returned an empty
string. It now returns the sealed token like the deprecated overload.
The test now checks the returned value against the cookie.

Closes ESAPI#928
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setRememberToken without password returns an empty string instead of the token

1 participant