mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
Fix infinite loop in splitEmail() when name is '"'
This commit is contained in:
parent
b2150be8f7
commit
749ebcd9d1
@ -103,7 +103,7 @@ export function splitEmail(email_string) : { name : string, email : string }
|
||||
split.email = parts[1].substring(0, parts[1].length - 1).trim();
|
||||
split.name = parts[0].trim();
|
||||
// remove quotes
|
||||
while((split.name[0] === '"' || split.name[0] === "'") && split.name[0] === split.name.substr(-1))
|
||||
while(split.name.length > 1 && (split.name[0] === '"' || split.name[0] === "'") && split.name[0] === split.name.substring(split.name.length - 1))
|
||||
{
|
||||
split.name = split.name.substring(1, split.name.length - 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user