do not remember session tokens by default#2351
Merged
LukasReschke merged 2 commits intomasterfrom Nov 28, 2016
Merged
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. |
ChristophWurst
commented
Nov 27, 2016
|
|
||
| $this->tokenProvider->expects($this->once()) | ||
| ->method('generateToken') | ||
| ->with($sessionId, $uid, $loginName, $realPassword, 'Firefox'); |
Member
Author
There was a problem hiding this comment.
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
MorrisJobke
reviewed
Nov 28, 2016
tests/lib/User/SessionTest.php
Outdated
| $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); |
Member
There was a problem hiding this comment.
The order seems to be mixed up here. 😕
Member
Author
There was a problem hiding this comment.
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
|
Member
|
👍 |
Member
|
LGTM |
This was referenced Jan 16, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.