mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 21:15:56 +03:00
[GH-ISSUE #821] Spaces in passwords are not handled correctly when adding servers #489
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#489
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ivanov17 on GitHub (Nov 4, 2023).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/821
Originally assigned to: @Shadow243 on GitHub.
🐛 Bugreport
When I try to add a new IMAP or SMTP server on the
Serverspage and specify a password that contains spaces, I get the messageUnable to save this server, are the username and password correct?.At the same time, in the IMAP server logs I see the error
authentication failure: checkpass failed. But the password provided is correct.When I use a password of the same length but without spaces, the authentication succeeds and I can receive or send emails. This means that Cypht does not handle spaces in passwords correctly in this case.
In principle, SMTP and IMAP servers can accept any Unicode characters in passwords. This means that Cypht must also accept any Unicode characters and handle them as expected.
However, the login page handles spaces in passwords properly.
Also, this either does not affect the issue https://github.com/cypht-org/cypht/issues/820 or may just be an additional factor. At least I still can't save the settings permanently, even using a password without spaces.
Version & Environment
Rev:
v1.4.0OS: CentOS Stream 9 container
PHP: 8.2.12
Steps to reproduce
Serverspage@marclaporte commented on GitHub (Nov 4, 2023):
I am OK for spaces in the password, but not spaces as first or last character because it causes too many support requests when people copy-paste passwords (which make sense when they are super-long)
https://github.com/cypht-org/cypht/pull/780
@Shadow243 commented on GitHub (Nov 4, 2023):
We are already initiating a solution to the case, but it appears that the error lies in spaces being transformed into plus signs, especially when they are in the middle of passwords.
@ivanov17 commented on GitHub (Nov 4, 2023):
@marclaporte In this case, Cypht also stores passwords for remote services, and hypothetically they can be anything. I think the main concern here should be to properly store whatever password the user wants to store.
There is an interesting discussion on spaces in passwords on StackExchange: https://security.stackexchange.com/questions/32691/why-not-allow-spaces-in-a-password
In the comments, among other things, the following opinion is found:
Perhaps a better solution would be to warn the user about leading or trailing spaces.
@marclaporte commented on GitHub (Nov 7, 2023):
For the record, I am supportive of spaces in passwords (just not first/last character). Ref: https://xkcd.com/936/
@marclaporte commented on GitHub (Dec 14, 2023):
@ivanov17 Good point that the user may not be able to modify the password from an external service. But I have never seen a password with a trailing space in my long career in IT. OTOH, I have many times helped users with an accidental trailing space that would cause multiple tries and to lock their account. As long as users are warned, I am OK.
@Shadow243: Your decision.
@marclaporte commented on GitHub (Dec 15, 2023):
We already have a PR for this: https://github.com/cypht-org/cypht/pull/780
@Shadow243 commented on GitHub (Mar 23, 2024):
This issue has been solved by this: https://github.com/cypht-org/cypht/pull/822
@marclaporte commented on GitHub (Mar 23, 2024):
@ivanov17 Please test and re-open if issue persists.