Issue 2551425
Created on 2026-08-31 08:46 by matre, last changed 2026-09-01 01:18 by rouilj.
| msg8504 |
Author: [hidden] (matre) |
Date: 2026-08-31 08:46 |
|
audit_user_fields() in the userauditor detector checks for duplicate alternate addresses
using:
check_alts = [x for x in db.user.filter(None, {'alternate_addresses': address}) if x !=
nodeid]
`filter()` on a String property compiles to `ILIKE '%value%'`, so any address that's a
substring of an existing alternate_addresses entry is rejected as a duplicate. For example,
setting `ken@example.com` fails if another user has `sp_ken@example.com` in their alternates.
This bug has seemingly existed for as long as the `check_alt` line was added, but I confirmed
it on version 2.4.0. Attached is a patch mitigating this by checking for exact matches post-
filter, sort of like how it's done in the `mailgw.py` function `uidFromAddress()`.
|
| msg8505 |
Author: [hidden] (rouilj) |
Date: 2026-09-01 01:18 |
|
Hello Mattias:
Thanks for the patch and including a test as well.
I am busy tomorrow and will plan on committing it on wednesday
with credit given to you.
|
|
| Date |
User |
Action |
Args |
| 2026-09-01 01:18:25 | rouilj | set | status: new -> open assignee: rouilj messages:
+ msg8505 nosy:
+ rouilj |
| 2026-08-31 09:45:15 | wilsj | set | nosy:
+ wilsj |
| 2026-08-31 08:46:18 | matre | create | |
|