You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/OAuthImplicit.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ class OAuthImplicit {
49
49
// Avoiding an injection attack: check that the hash only includes expected characters
50
50
// An example: #access_token=eyJ0eXA...[Access tokens can be 610 characters or longer]...wKVQLqF6A&expires_in=28800&token_type=bearer&state=e3f287fbe93...c58bd6a67fe2
51
51
// No characters other than #.-&=_ a-z A-Z 0-9 (no spaces)
52
-
consthashRegex=/[^#.\-&=_a-zA-Z0-9]/;
52
+
consthashRegex=/[^#.%\-&=_a-zA-Z0-9]/;
53
53
if(hash.search(hashRegex)!==-1){
54
54
console.error(`Potential XSS attack via fragment (#) value: ${hash}`);
55
55
toast.error('Potential XSS attack via the fragment value. Please login again.',{
0 commit comments