Skip to content

Conversation

@ChristophWurst
Copy link
Member

On renew, a session token is duplicated. For some reason we did
not copy over the remember-me attribute value. Hence, the new token
was deleted too early in the background job and remember-me did
not work properly.

Signed-off-by: Christoph Wurst [email protected]

On renew, a session token is duplicated. For some reason we did
not copy over the remember-me attribute value. Hence, the new token
was deleted too early in the background job and remember-me did
not work properly.

Signed-off-by: Christoph Wurst <[email protected]>
@mention-bot
Copy link

@ChristophWurst, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LukasReschke, @rullzer and @icewind1991 to be potential reviewers.

$newToken->setName('MyTokenName');
$newToken->setToken(hash('sha512', 'newId' . 'MyInstanceSecret'));
$newToken->setType(IToken::TEMPORARY_TOKEN);
$newToken->setRemember(IToken::REMEMBER);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, the test method also passes if I omit this line. I thought the line ->with($this->equalTo($newToken)) below would assert that those objects are equal. Apparently it doesn't really care, or at least with my version of phpunit locally.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is because the object is the same, but the content is not mandatorily the same. So it's not a in-depth comparison, but only a comparison of the "pointers" to an object.

@ChristophWurst
Copy link
Member Author

Note: I applied the remember-me patch #1347 onto my nc10 installation and I've experience some unexpected logouts. I'm pretty sure this is what caused it.

@MorrisJobke
Copy link
Member

👍

1 similar comment
@icewind1991
Copy link
Member

👍

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants