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 virtuser_file plugin email2user() function not accounting for backward slashes in username #9668

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

idressos
Copy link

@idressos idressos commented Oct 8, 2024

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 ''.

@pabzm
Copy link
Member

pabzm commented Oct 23, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants