Przeglądaj źródła

Merge pull request #2167 from jaapmarcus/fix/disable-reset-endpoint

Disable /reset/ endpoint when POLICY_SYSTEM_PASSWORD_RESET = no
Raphael Schneeberger 4 lat temu
rodzic
commit
1689c2e86c
2 zmienionych plików z 7 dodań i 0 usunięć
  1. 2 0
      CHANGELOG.md
  2. 5 0
      web/reset/index.php

+ 2 - 0
CHANGELOG.md

@@ -7,6 +7,8 @@ All notable changes to this project will be documented in this file.
 
 ### Bugfixes
 
+- Disable /reset/ endpoint when POLICY_SYSTEM_PASSWORD_RESET = no
+
 ## [1.4.17] - Service release 
 
 ### Bugfixes

+ 5 - 0
web/reset/index.php

@@ -11,6 +11,11 @@ if (isset($_SESSION['user'])) {
 // Main include
 include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
 
+if ($_SESSION['POLICY_SYSTEM_PASSWORD_RESET'] == 'no') {
+    header('Location: /login/');
+    exit();
+}
+
 if ((!empty($_POST['user'])) && (empty($_POST['code']))) {
     // Check token
     verify_csrf($_POST);