-
Notifications
You must be signed in to change notification settings - Fork 357
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
webui: Show warning when trying to use non-ASCII LUKS passphrase #5102
webui: Show warning when trying to use non-ASCII LUKS passphrase #5102
Conversation
41f877b
to
59cff8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me. You are so fast!
I just wonder, would someone from the Cockpit team be willing to take a look if there is not a function already for ASCII characters check? @martinpitt |
Something like this? const onlyAscii = str => [...str].every(char => char.charCodeAt(0) <= 127); |
59cff8f
to
8214132
Compare
We show this warning in the GTK UI so we should show it in the WebUI too. Resolves: rhbz#2234518
8214132
to
e2bdc86
Compare
/kickstart-test --waive webui-only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - just a suggestion about the error message. :)
variant="warning" | ||
component="li" | ||
> | ||
{_("The passphrase you have provided contains non-ASCII characters. You may not be able to switch between keyboard layouts when typing it.")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change the formulation a bit, as both sentences look kinda disjoint. Maybe something like:
"The passphrase you have provided contains non-ASCII characters, which you might not be able to enter, as keyboard switching if often not available when LUKS passphrase is requested."
Maybe @VladimirSlavik might also have some ideas. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message is copied from pyanaconda/core/constants.py
to match the warning you get in the GTK UI. If you have some suggestion, we should change it everywhere.
We show this warning in the GTK UI so we should show it in the WebUI too.
Resolves: rhbz#2234518