-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do not remember session tokens by default #2351
Conversation
@ChristophWurst, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rullzer, @icewind1991 and @LukasReschke to be potential reviewers. |
@@ -850,7 +890,7 @@ public function testCreateSessionTokenWithTokenPassword() { | |||
|
|||
$this->tokenProvider->expects($this->once()) | |||
->method('generateToken') | |||
->with($sessionId, $uid, $loginName, $realPassword, 'Firefox'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. I would have expected this assertion to fail.
We have to respect the value of the remember-me checkbox. Due to an error in the source code the default value for the session token was to remember it. Signed-off-by: Christoph Wurst <[email protected]>
1e2460b
to
9b808c4
Compare
@@ -801,11 +800,52 @@ public function testCreateSessionToken() { | |||
|
|||
$this->tokenProvider->expects($this->once()) | |||
->method('generateToken') | |||
->with($sessionId, $uid, $loginName, $password, 'Firefox'); | |||
->with($sessionId, $uid, $loginName, $password, 'Firefox', IToken::DO_NOT_REMEMBER, IToken::TEMPORARY_TOKEN); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order seems to be mixed up here. 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Apparently the test did not fail because both constants define the same value 😟
Signed-off-by: Christoph Wurst <[email protected]>
Current coverage is 57.06% (diff: 100%)@@ master #2351 diff @@
==========================================
Files 1191 1191
Lines 71912 71920 +8
Methods 7299 7299
Messages 0 0
Branches 1213 1213
==========================================
+ Hits 41036 41044 +8
Misses 30876 30876
Partials 0 0
|
👍 |
LGTM |
We have to respect the value of the remember-me checkbox. Due to an error
in the source code the default value for the session token was to remember
it.