Browse Source

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

pull/539/head
Kyle Spearrin 4 years ago committed by GitHub
parent
commit
c4fb4a35ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      common/src/misc/utils.ts

3
common/src/misc/utils.ts

@ -219,7 +219,8 @@ export class Utils { @@ -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;
}

Loading…
Cancel
Save