Browse Source

Cleaner XSS Vulnerability (#1291)

CauseFX 6 years ago
parent
commit
14790808f9
1 changed files with 3 additions and 4 deletions
  1. 3 4
      js/functions.js

+ 3 - 4
js/functions.js

@@ -4018,10 +4018,9 @@ function errorPage(error=null,uri=null){
         local('set','uri',uri);
     }
 	//var urlParams = new URLSearchParams(window.location.search);
-	if($.urlParam('error') !== null && typeof $.urlParam('error') === 'string'){
-	    if($.urlParam('error').length === 3){
-            local('set','error',$.urlParam('error'));
-        }
+
+	if($.urlParam('error') !== null && !isNaN(Number($.urlParam('error')))){
+        local('set','error',$.urlParam('error'));
 	}
     if($.urlParam('return') !== null && activeInfo.user.loggedin !== true){
         local('set','uri',$.urlParam('return'));