Skip to content
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

fix(settings): Disable renaming for tokens marked to be wiped #42331

Merged
merged 2 commits into from Jan 29, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Dec 16, 2023

Summary

This otherwise a WipeException will be thrown when trying to rename (by getTokenById in PublicKeyTokenProvider).

Checklist

@susnux susnux requested review from a team, icewind1991, Altahrim and Fenn-CS and removed request for a team December 16, 2023 17:32
@susnux susnux requested a review from come-nc December 16, 2023 17:33
@@ -105,7 +105,7 @@
return array_map(function (IToken $token) use ($sessionToken) {
$data = $token->jsonSerialize();
$data['canDelete'] = true;
$data['canRename'] = $token instanceof INamedToken;
$data['canRename'] = $token instanceof INamedToken && $data['type'] !== IToken::WIPE_TOKEN;

Check notice

Code scanning / Psalm

DeprecatedClass Note

Class OC\Authentication\Token\IToken is deprecated
Copy link
Contributor

@emoral435 emoral435 left a comment

Choose a reason for hiding this comment

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

LGTM!

This otherwise a WipeException will be thrown when trying to rename

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
Copy link
Contributor Author

susnux commented Jan 29, 2024

/backport to stable28

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux merged commit cff36b7 into master Jan 29, 2024
135 checks passed
@susnux susnux deleted the fix/auth-token-settings branch January 29, 2024 17:47
@blizzz blizzz mentioned this pull request Mar 5, 2024
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.

None yet

3 participants