Repository navigation
Conversation
MarioPym
requested review from
Altahrim,
come-nc,
icewind1991 and
leftybournes
and removed request for
a team
October 21, 2026 16:44
susnux
approved these changes
Oct 21, 2026
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Mario Alfonso Pym Mejía <pymm@hitss.com>
MarioPym
force-pushed
the
fix/reject-empty-app-password-name
branch
from
October 30, 2026 21:07
5ee1239 to
36a213b
Compare
Author
|
Rebased onto master to resolve the conflict with the TokenScopes changes in update(). The fix itself is unchanged. |
come-nc
reviewed
Nov 2, 2026
come-nc
left a comment
Contributor
There was a problem hiding this comment.
Shouldn’t we trim the name at the beginning then, to forbid confusing spaces at start&end ?
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Mario Alfonso Pym Mejía <pymm@hitss.com>
Author
Good point, done. The name is now trimmed on create and on rename. On update it's only trimmed when the name actually changes, so existing tokens whose names already have surrounding spaces aren't renamed when only the scope is changed. |
This branch has not been deployed
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.
Summary
An app password can be renamed to an empty or whitespace-only name: the request returns 200 and the token is saved without a visible name in the list. On creation, an empty name is already rejected, but a whitespace-only name is accepted.
update()now returns 400 when the new name is empty after trimming, before anything is changed, so the frontend shows its existing error and restores the previous name. Tokens that already have an empty name can still change their filesystem scope, since the check only applies when the name changes.create()now also treats a whitespace-only name as empty and keeps the existing 503 response.How to test
Checklist
3. to review, feature component)stable32)AI (if applicable)