-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 virtuser_file plugin email2user() function not accounting for backward slashes in username #9668
Conversation
Thank you for the fix! Could you maybe add a short comment above the changed line to give future developers an idea, why this is necessary? |
Add operator spacing to fix coding style check
Done. |
@alecpl I'll wait one week for any comment from you, else I'd just merge this (since it's simple enough). |
Feel free to merge, don't forget to mention the change in the Changelog. |
@alecpl What about |
If it is a bugfix, and it is reasonably safe (small possibility to break something) and easy to backport then we should backport to release-1.6. |
So what's your conclusion regarding this PR? Backport it? From your description I'd say yes, but since this has been your sole practice for a long time, you should decide. |
Yes. |
Fix virtuser_file plugin email2user() function not accounting for backward slashes in username Cherry-picked from 875e370 (parent mainline 1).
(cherry picked from commit a07d61a)
This addresses login issues when using aliases, if the resolved username includes a '@' character.
In the /etc/postfix/virtual file, usernames including a '@' character are saved with a leading '' character.
For example:
[email protected] becomes rocky.balboa**@**company.com
The function right above (user2email()) is accounting for this issue, it just seems it was forgotten for email2user().
I discovered this because I am using Roundcube with Webmin/Virtualmin.
Starting recent versions, Virtualmin includes the '@' character in internal usernames. In previous versions it was replaced by a '%' character, thus there was no need for a leading ''.