Skip to content

Commit 073cbc6

Browse files
authored
Merge pull request #1 from nuubik/patch-1
Update index.js
2 parents 10b5b8e + 2ef3855 commit 073cbc6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ studio.protocol = (function(ProtoBuf) {
145145

146146
this.sendAuthRequest = function(lastAttemptErrorMessage = ""){
147147
authenticate(lastAttemptErrorMessage).then(function(authRequest){
148-
var credentials = new TextEncoder().encode(authRequest.userID + ':' + authRequest.password); // encode to utf-8 byte array
148+
var credentials = new TextEncoder().encode(authRequest.userID.toLowerCase() + ':' + authRequest.password); // encode to utf-8 byte array
149149
let authReq = new obj.AuthRequest();
150-
authReq.user_id = authRequest.userID;
150+
authReq.user_id = authRequest.userID.toLowerCase();
151151
var colon = new Int8Array([':'.charCodeAt(0)]);
152152
crypto.subtle.digest('SHA-256', credentials.buffer)
153153
.then(function(digest) {

0 commit comments

Comments
 (0)