瀏覽代碼

script could be loaded when $edit_identity is set to false

tokul 19 年之前
父節點
當前提交
495f71f8ce
共有 2 個文件被更改,包括 9 次插入0 次删除
  1. 2 0
      ChangeLog
  2. 7 0
      src/options_identities.php

+ 2 - 0
ChangeLog

@@ -80,6 +80,8 @@ Version 1.5.2 - CVS
     should be converted to html line breaks.
     should be converted to html line breaks.
   - Add note to conf.pl / config_default.php to warn users that set
   - Add note to conf.pl / config_default.php to warn users that set
     sensitive passwords in that file to properly secure it.
     sensitive passwords in that file to properly secure it.
+  - Prevent modifications in advanced identities, when editing of
+    identities is disabled.
 
 
 Version 1.5.1 (branched on 2006-02-12)
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------
 --------------------------------------

+ 7 - 0
src/options_identities.php

@@ -21,6 +21,13 @@ require('../include/init.php');
 /* SquirrelMail required files. */
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'functions/identity.php');
 require_once(SM_PATH . 'functions/identity.php');
 
 
+/* make sure that page is not available when $edit_identity is false */
+if (!$edit_identity) {
+    error_box(_("Editing identities is disabled."));
+    $oTemplate->display('footer.tpl');
+    die();
+}
+
 if (!sqgetGlobalVar('identities', $identities, SQ_SESSION)) {
 if (!sqgetGlobalVar('identities', $identities, SQ_SESSION)) {
     $identities = get_identities();
     $identities = get_identities();
 }
 }