root hace 5 meses
padre
commit
d1128cc719
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      html/inc/common.php

+ 2 - 0
html/inc/common.php

@@ -121,6 +121,8 @@ function getSafeRedirectUrl(string $default = '/'): string {
         ?? filter_input(INPUT_POST, 'redirect_url', FILTER_SANITIZE_URL) 
         ?? $default;
 
+    $default = urlencode($default);
+
     $decodedUrl = urldecode($url);
     // Проверяем:
     // 1. URL начинается с `/` (но не `//` или `http://`)