Explorar el Código

Cleaner XSS Vulnerability (#1291)

CauseFX hace 6 años
padre
commit
14790808f9
Se han modificado 1 ficheros con 3 adiciones y 4 borrados
  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'));