mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-24 07:38:12 +08:00
Lowercase punycode domain names
This commit is contained in:
parent
d2167dd290
commit
aa7323ba43
1 changed files with 2 additions and 2 deletions
4
vendors/mathiasbynens/punycode.js
vendored
4
vendors/mathiasbynens/punycode.js
vendored
|
@ -62,7 +62,7 @@ const
|
|||
mapDomain = (domain, callback) => {
|
||||
// In email addresses, only the domain name should be punycoded.
|
||||
// Leave the local part (i.e. everything up to `@`) intact.
|
||||
const parts = domain.split('@');
|
||||
const parts = (domain || '').split('@');
|
||||
parts.push(
|
||||
parts.pop()
|
||||
.split(regexSeparators)
|
||||
|
@ -389,7 +389,7 @@ const
|
|||
*/
|
||||
toASCII: input => mapDomain(
|
||||
input,
|
||||
string => regexNonASCII.test(string) ? 'xn--' + encode(string) : string
|
||||
string => (regexNonASCII.test(string) ? 'xn--' + encode(string) : string).toLowerCase()
|
||||
)
|
||||
};
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue