Skip to content

Commit 28b2f0b

Browse files
author
Javier Centurion
committed
Fix Basic Auth with force
1 parent 02a63e2 commit 28b2f0b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/scripts/api-console.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1922,7 +1922,7 @@
19221922
};
19231923

19241924
Basic.Token = function(credentials) {
1925-
var words = CryptoJS.enc.Utf8.parse(credentials.username + ':' + credentials.password);
1925+
var words = CryptoJS.enc.Utf8.parse((credentials.username || '') + ':' + (credentials.password || ''));
19261926
this.encoded = CryptoJS.enc.Base64.stringify(words);
19271927
};
19281928

src/common/client/auth_strategies/basic_auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
};
1515

1616
Basic.Token = function(credentials) {
17-
var words = CryptoJS.enc.Utf8.parse(credentials.username + ':' + credentials.password);
17+
var words = CryptoJS.enc.Utf8.parse((credentials.username || '') + ':' + (credentials.password || ''));
1818
this.encoded = CryptoJS.enc.Base64.stringify(words);
1919
};
2020

0 commit comments

Comments
 (0)