소스 검색

small fix

root 5 달 전
부모
커밋
d1128cc719
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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://`)