Merge pull request #9668 from idressos/virtuser_file-email2user-fix

Fix virtuser_file plugin email2user() function not accounting for backward slashes in username
This commit is contained in:
Pablo Zmdl
2024-11-05 12:06:14 +01:00
committed by GitHub

View File

@@ -68,7 +68,9 @@ class virtuser_file extends rcube_plugin
$arr = preg_split('/\s+/', trim($r[$i]));
if (count($arr) > 0) {
$p['user'] = trim($arr[count($arr) - 1]);
// Replace '\@' with '@' to handle cases where internal usernames include an '@' character.
// Sometimes usernames with '@' are saved with a leading '\' to avoid conflicts.
$p['user'] = trim(str_replace('\@', '@', $arr[count($arr) - 1]));
break;
}
}