From aa7323ba436415fd8354426f625861ba5168cd38 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 12 Mar 2024 19:50:11 +0100 Subject: [PATCH] Lowercase punycode domain names --- vendors/mathiasbynens/punycode.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendors/mathiasbynens/punycode.js b/vendors/mathiasbynens/punycode.js index b407d9a8f..7afa38258 100644 --- a/vendors/mathiasbynens/punycode.js +++ b/vendors/mathiasbynens/punycode.js @@ -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() ) }; })();