root hai 5 meses
pai
achega
d1128cc719
Modificáronse 1 ficheiros con 2 adicións e 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://`)