Skip to content

Commit 938bfdd

Browse files
committed
Now the token issue is truly fixed, as the format length is ignored
1 parent b285a08 commit 938bfdd

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

js/setToken.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,19 @@ async function validateToken(token = '') {
100100
return [true, 'INVALID-TOKEN-CHARACTERS'];
101101

102102
let tA = token.split('.');
103-
if (tA.length < 3 || tA.length > 3) return [true, 'INVALID-TOKEN-FORMAT'];
104-
tA[0] = tA[0].length;
105-
tA[1] = tA[1].length;
106-
tA[2] = tA[2].length;
107-
if (
108-
tA[0] < 24 ||
109-
tA[0] > 24 ||
110-
tA[1] < 6 ||
111-
tA[1] > 6 ||
112-
tA[2] < 27 ||
113-
tA[2] > 27
114-
)
115-
return [true, 'INVALID-TOKEN-FORMAT'];
103+
if (tA.length != 3) return [true, 'INVALID-TOKEN-FORMAT'];
104+
// tA[0] = tA[0].length;
105+
// tA[1] = tA[1].length;
106+
// tA[2] = tA[2].length;
107+
// if (
108+
// tA[0] < 24 ||
109+
// tA[0] > 24 ||
110+
// tA[1] < 6 ||
111+
// tA[1] > 6 ||
112+
// tA[2] < 27 ||
113+
// tA[2] > 27
114+
// )
115+
// return [true, 'INVALID-TOKEN-FORMAT'];
116116

117117
return [false, 'none'];
118118
}

0 commit comments

Comments
 (0)