Throw on bad server url
// FREEBIE
This commit is contained in:
parent
e30ac86c8a
commit
868695558d
2 changed files with 6 additions and 0 deletions
|
@ -38790,6 +38790,9 @@ var TextSecureServer = (function() {
|
||||||
var attachment_id_regex = RegExp( "^https:\/\/.*\/(\\d+)\?");
|
var attachment_id_regex = RegExp( "^https:\/\/.*\/(\\d+)\?");
|
||||||
|
|
||||||
function TextSecureServer(url, username, password) {
|
function TextSecureServer(url, username, password) {
|
||||||
|
if (typeof url !== 'string') {
|
||||||
|
throw new Error('Invalid server url');
|
||||||
|
}
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.username = username;
|
this.username = username;
|
||||||
this.password = password;
|
this.password = password;
|
||||||
|
|
|
@ -73,6 +73,9 @@ var TextSecureServer = (function() {
|
||||||
var attachment_id_regex = RegExp( "^https:\/\/.*\/(\\d+)\?");
|
var attachment_id_regex = RegExp( "^https:\/\/.*\/(\\d+)\?");
|
||||||
|
|
||||||
function TextSecureServer(url, username, password) {
|
function TextSecureServer(url, username, password) {
|
||||||
|
if (typeof url !== 'string') {
|
||||||
|
throw new Error('Invalid server url');
|
||||||
|
}
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.username = username;
|
this.username = username;
|
||||||
this.password = password;
|
this.password = password;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue