1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-29 04:17:41 +02:00

[PM-3575] Public Suffix List Incorrectly Detected (#6735)

This commit is contained in:
Cesar Gonzalez 2023-11-15 14:13:25 -06:00 committed by GitHub
parent 8e047f615e
commit 91fd4f7411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,7 +289,10 @@ export class Utils {
}
try {
const parseResult = parse(uriString, { validHosts: this.validHosts });
const parseResult = parse(uriString, {
validHosts: this.validHosts,
allowPrivateDomains: true,
});
if (parseResult != null && parseResult.hostname != null) {
if (parseResult.hostname === "localhost" || parseResult.isIp) {
return parseResult.hostname;