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

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

idressos
Copy link
Contributor

@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?

Add operator spacing to fix coding style check
@idressos
Copy link
Contributor Author

Done.

@pabzm pabzm requested review from alecpl and pabzm October 30, 2024 15:03
@pabzm
Copy link
Member

pabzm commented Oct 30, 2024

@alecpl I'll wait one week for any comment from you, else I'd just merge this (since it's simple enough).

@alecpl
Copy link
Member

alecpl commented Oct 30, 2024

Feel free to merge, don't forget to mention the change in the Changelog.

@pabzm pabzm self-requested a review November 5, 2024 10:59
@pabzm pabzm merged commit 875e370 into roundcube:master Nov 5, 2024
16 checks passed
pabzm added a commit that referenced this pull request Nov 5, 2024
@pabzm
Copy link
Member

pabzm commented Nov 5, 2024

@alecpl What about release-1.6? As far as I can tell you hand-pick the changes that go in there? Should this fix be backported, too?

@alecpl
Copy link
Member

alecpl commented Nov 5, 2024

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.

@pabzm
Copy link
Member

pabzm commented Nov 5, 2024

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.

@alecpl
Copy link
Member

alecpl commented Nov 5, 2024

Yes.

pabzm added a commit that referenced this pull request Nov 5, 2024
Fix virtuser_file plugin email2user() function not accounting for backward slashes in username

Cherry-picked from 875e370 (parent mainline 1).
pabzm added a commit that referenced this pull request Nov 5, 2024
(cherry picked from commit a07d61a)
@pabzm
Copy link
Member

pabzm commented Nov 5, 2024

#9691

alecpl pushed a commit that referenced this pull request Nov 6, 2024
* Merge pull request #9668 from idressos/virtuser_file-email2user-fix

Fix virtuser_file plugin email2user() function not accounting for backward slashes in username

Cherry-picked from 875e370 (parent mainline 1).

* Changelog entry for #9668

(cherry picked from commit a07d61a)
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.

3 participants