1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-06 09:20:43 +01:00

don't allow @ character in uriString prefixing (#538)

This commit is contained in:
Kyle Spearrin 2021-11-09 11:16:40 -05:00 committed by GitHub
parent 8f177e2d3a
commit c4fb4a35ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,7 +219,8 @@ export class Utils {
}
let httpUrl = uriString.startsWith('http://') || uriString.startsWith('https://');
if (!httpUrl && uriString.indexOf('://') < 0 && Utils.tldEndingRegex.test(uriString)) {
if (!httpUrl && uriString.indexOf('://') < 0 && Utils.tldEndingRegex.test(uriString) &&
uriString.indexOf('@') < 0) {
uriString = 'http://' + uriString;
httpUrl = true;
}