Skip to content

Conversation

@nickvergessen
Copy link
Member

@nickvergessen
Copy link
Member Author

/backport to stable23

@nickvergessen
Copy link
Member Author

/backport to stable22

Copy link
Member

@CarlSchwan CarlSchwan left a comment

Choose a reason for hiding this comment

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

Change make sense

Signed-off-by: Joas Schilling <[email protected]>
$token->setLastActivity($now);
$this->mapper->update($token);
} elseif (!empty($token->getUpdatedFields())) {
$this->mapper->update($token);
Copy link
Member

Choose a reason for hiding this comment

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

while this fixes the issue it's weird that we do this regular update in a updateTokenActivity method, isn't it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Only alternate approach is to either bring the double update back, or to move the acivity time calculation to the session and make the "which update to use" decision there:

$this->tokenProvider->updateTokenActivity($dbToken);
return true;

Copy link
Member

Choose a reason for hiding this comment

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

I think the double update is the subjectively cleanest as changes are written right where they are made

Copy link
Member Author

Choose a reason for hiding this comment

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

Also fine by me

@szaimen szaimen requested a review from PVince81 November 12, 2021 13:06
@nickvergessen
Copy link
Member Author

Replaced by #29682

@szaimen szaimen deleted the bugfix/29678/fix-token-update branch November 12, 2021 13:48
@MichaIng MichaIng removed this from the Nextcloud 24 milestone Jan 3, 2022
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.

22.2.1 is very slow

5 participants