Remove the master password (#4272)
authorMatthias Schmidt <gravatronics@live.com>
Wed, 9 Jun 2021 13:26:52 +0000 (15:26 +0200)
committerGitHub <noreply@github.com>
Wed, 9 Jun 2021 13:26:52 +0000 (15:26 +0200)
Close #3913

24 files changed:
com.woltlab.wcf/acpTemplateDelete.xml [new file with mode: 0644]
com.woltlab.wcf/fileDelete.xml [new file with mode: 0644]
com.woltlab.wcf/option.xml
constants.php
wcfsetup/install/files/acp/templates/masterPassword.tpl [deleted file]
wcfsetup/install/files/acp/templates/masterPasswordInit.tpl [deleted file]
wcfsetup/install/files/lib/acp/action/LogoutAction.class.php
wcfsetup/install/files/lib/acp/form/LanguageImportForm.class.php
wcfsetup/install/files/lib/acp/form/LanguageMultilingualismForm.class.php
wcfsetup/install/files/lib/acp/form/MasterPasswordForm.class.php [deleted file]
wcfsetup/install/files/lib/acp/form/MasterPasswordInitForm.class.php [deleted file]
wcfsetup/install/files/lib/acp/form/OptionForm.class.php
wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php
wcfsetup/install/files/lib/acp/form/PackageUpdateServerAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserGroupOptionForm.class.php
wcfsetup/install/files/lib/acp/page/PackageInstallationConfirmPage.class.php
wcfsetup/install/files/lib/acp/page/PackageUpdatePage.class.php
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/lib/system/WCFACP.class.php
wcfsetup/install/files/lib/system/WCFSetup.class.php
wcfsetup/install/files/options.inc.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

diff --git a/com.woltlab.wcf/acpTemplateDelete.xml b/com.woltlab.wcf/acpTemplateDelete.xml
new file mode 100644 (file)
index 0000000..10e8440
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/2019/acpTemplateDelete.xsd">
+       <delete>
+               <template>masterPassword</template>
+               <template>masterPasswordInit</template>
+       </delete>
+</data>
diff --git a/com.woltlab.wcf/fileDelete.xml b/com.woltlab.wcf/fileDelete.xml
new file mode 100644 (file)
index 0000000..a1f0a46
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/2019/fileDelete.xsd">
+       <delete>
+               <file>acp/masterPassword.inc.php</file>
+               <file>lib/acp/form/MasterPasswordForm.class.php</file>
+               <file>lib/acp/form/MasterPasswordInitForm.class.php</file>
+       </delete>
+</data>
index 2813b7854ed78a69a2edacd378db080a18343ae3..1fa47391fc451f07f031bca0f16cd1100d3ee271 100644 (file)
                                <defaultvalue>1</defaultvalue>
                                <hidden>1</hidden>
                        </option>
-                       <option name="module_master_password">
-                               <categoryname>module.system</categoryname>
-                               <optiontype>boolean</optiontype>
-                               <defaultvalue>0</defaultvalue>
-                       </option>
                        <option name="visitor_use_tiny_build">
                                <categoryname>module.system</categoryname>
                                <optiontype>boolean</optiontype>
@@ -1704,4 +1699,7 @@ DESC:wcf.global.sortOrder.descending</selectoptions>
                        </option>
                </options>
        </import>
+       <delete>
+               <option name="module_master_password"/>
+       </delete>
 </data>
index c368f8e30f3e33db108eb1b251000a0f1e0ca8fb..86ace69315a8811204ff4c4916d14510b0fe9527 100644 (file)
@@ -9,7 +9,6 @@
  */
 
 // automatically defined constants/constants defined with classes
-\define('MASTER_PASSWORD', '');
 \define('PACKAGE_ID', 1);
 \define('PACKAGE_NAME', '');
 \define('RELATIVE_WCF_DIR', '');
@@ -28,7 +27,6 @@
 \define('LAST_UPDATE_TIME', 0);
 \define('WCF_UUID', 'bd096261-15f4-5dc1-9767-01ce08d7c80b');
 \define('WOLTLAB_BRANDING', 1);
-\define('MODULE_MASTER_PASSWORD', 0);
 \define('VISITOR_USE_TINY_BUILD', 0);
 \define('ENABLE_DEBUG_MODE', 1);
 \define('ENABLE_BENCHMARK', 0);
diff --git a/wcfsetup/install/files/acp/templates/masterPassword.tpl b/wcfsetup/install/files/acp/templates/masterPassword.tpl
deleted file mode 100644 (file)
index 97d2ca0..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-{include file='header' pageTitle='wcf.acp.masterPassword.enter'}
-
-<script data-relocate="true">
-       $(function() {
-               $('#masterPassword').focus();
-       });
-</script>
-
-<header class="contentHeader">
-       <h1 class="contentTitle">{lang}wcf.acp.masterPassword.enter{/lang}</h1>
-</header>
-
-<p class="warning">
-       {lang}wcf.acp.masterPassword.enter.deprecated{/lang}
-</p>
-
-{include file='formError'}
-
-<form method="post" action="{link controller='MasterPassword'}{/link}">
-       <div class="section">
-               <dl{if $errorField == 'masterPassword'} class="formError"{/if}>
-                       <dt><label for="masterPassword">{lang}wcf.acp.masterPassword{/lang}</label></dt>
-                       <dd>
-                               <input type="password" id="masterPassword" name="masterPassword" value="{$masterPassword}" class="medium">
-                               {if $errorField == 'masterPassword'}
-                                       <small class="innerError">
-                                               {if $errorType == 'empty'}
-                                                       {lang}wcf.global.form.error.empty{/lang}
-                                               {else}
-                                                       {lang}wcf.acp.masterPassword.error.{@$errorType}{/lang}
-                                               {/if}
-                                       </small>
-                               {/if}
-                               <small>{lang}wcf.acp.masterPassword.enter.description{/lang}</small>
-                       </dd>
-               </dl>
-               
-               {event name='enterFields'}
-       </div>
-       
-       {event name='sections'}
-       
-       <div class="formSubmit">
-               <input type="submit" name="submitButton" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
-               <input type="hidden" name="url" value="{$url}">
-               {csrfToken}
-       </div>
-</form>
-
-{include file='footer'}
diff --git a/wcfsetup/install/files/acp/templates/masterPasswordInit.tpl b/wcfsetup/install/files/acp/templates/masterPasswordInit.tpl
deleted file mode 100644 (file)
index 9fba333..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-{include file='header' pageTitle='wcf.acp.masterPassword.init'}
-
-<script data-relocate="true">
-       $(function() {
-               $('#setPassword').click(function() {
-                       $('input[type="password"]').val($.proxy(function(index, element) {
-                               return $(this).text();
-                       }, this));
-               });
-       });
-</script>
-
-<header class="contentHeader">
-       <h1 class="contentTitle">{lang}wcf.acp.masterPassword.init{/lang}</h1>
-</header>
-
-{include file='formError'}
-
-<form method="post" action="{link controller='MasterPasswordInit'}{/link}">
-       <div class="section">
-               <dl{if $errorField == 'masterPassword'} class="formError"{/if}>
-                       <dt><label for="masterPassword">{lang}wcf.acp.masterPassword{/lang}</label></dt>
-                       <dd>
-                               <input type="password" id="masterPassword" name="masterPassword" value="{$masterPassword}" class="medium">
-                               {if $errorField == 'masterPassword'}
-                                       <small class="innerError">
-                                               {if $errorType == 'empty'}
-                                                       {lang}wcf.global.form.error.empty{/lang}
-                                               {else}
-                                                       {lang}wcf.acp.masterPassword.error.{@$errorType}{/lang}
-                                               {/if}
-                                       </small>
-                               {/if}
-                               <small>{lang}wcf.acp.masterPassword.init.description{/lang}</small>
-                       </dd>
-               </dl>
-               
-               <dl{if $errorField == 'confirmMasterPassword'} class="formError"{/if}>
-                       <dt><label for="confirmMasterPassword">{lang}wcf.acp.masterPassword.confirm{/lang}</label></dt>
-                       <dd>
-                               <input type="password" id="confirmMasterPassword" name="confirmMasterPassword" value="{$confirmMasterPassword}" class="medium">
-                               {if $errorField == 'confirmMasterPassword'}
-                                       <small class="innerError">
-                                               {if $errorType == 'empty'}
-                                                       {lang}wcf.global.form.error.empty{/lang}
-                                               {else}
-                                                       {lang}wcf.acp.masterPassword.error.{@$errorType}{/lang}
-                                               {/if}
-                                       </small>
-                               {/if}
-                       </dd>
-               </dl>
-               
-               <dl>
-                       <dt><label for="exampleMasterPassword">{lang}wcf.acp.masterPassword.example{/lang}</label></dt>
-                       <dd>
-                               <p><a class="jsTooltip" id="setPassword" title="{lang}wcf.acp.masterPassword.example.set{/lang}">{@$exampleMasterPassword}</a></p>
-                               <input type="hidden" id="exampleMasterPassword" name="exampleMasterPassword" value="{@$exampleMasterPassword}">
-                       </dd>
-               </dl>
-               
-               {event name='initFields'}
-       </div>
-       
-       {event name='sections'}
-       
-       <div class="formSubmit">
-               <input type="submit" name="submitButton" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
-               <input type="hidden" name="url" value="{$url}">
-               {csrfToken}
-       </div>
-</form>
-
-{include file='footer'}
index 4c32092926055fac48dc8791c24ad7e81821aa31..50afa676ae5a6bb6042df2b84d635de617ff962e 100755 (executable)
@@ -30,7 +30,6 @@ class LogoutAction extends AbstractSecureAction
         parent::execute();
 
         WCF::getSession()->clearReauthentication();
-        WCF::getSession()->unregister('masterPassword');
 
         $this->executed();
 
index 0a2433d8776ee0e305b169f791762aca5bb75b2d..2e6d5de31bcabf2f135324ff4468770b8330027e 100644 (file)
@@ -11,7 +11,6 @@ use wcf\system\exception\SystemException;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\LanguageFactory;
 use wcf\system\WCF;
-use wcf\system\WCFACP;
 use wcf\util\XML;
 
 /**
@@ -182,15 +181,4 @@ class LanguageImportForm extends AbstractForm
             'packageID' => $this->packageID,
         ]);
     }
-
-    /**
-     * @inheritDoc
-     */
-    public function show()
-    {
-        // check master password
-        WCFACP::checkMasterPassword();
-
-        parent::show();
-    }
 }
index d1a18726cf8918e5f6bb4e1eef9ccdc511c5beb4..dbf1a74289f3e1e4b5085f33075eb6f74bfb495b 100644 (file)
@@ -9,7 +9,6 @@ use wcf\system\cache\builder\LanguageCacheBuilder;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\LanguageFactory;
 use wcf\system\WCF;
-use wcf\system\WCFACP;
 use wcf\util\ArrayUtil;
 
 /**
@@ -167,15 +166,4 @@ class LanguageMultilingualismForm extends AbstractForm
             'languages' => $this->languages,
         ]);
     }
-
-    /**
-     * @inheritDoc
-     */
-    public function show()
-    {
-        // check master password
-        WCFACP::checkMasterPassword();
-
-        parent::show();
-    }
 }
diff --git a/wcfsetup/install/files/lib/acp/form/MasterPasswordForm.class.php b/wcfsetup/install/files/lib/acp/form/MasterPasswordForm.class.php
deleted file mode 100755 (executable)
index 3bcb924..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-<?php
-
-namespace wcf\acp\form;
-
-use wcf\form\AbstractForm;
-use wcf\system\exception\UserInputException;
-use wcf\system\request\LinkHandler;
-use wcf\system\request\RouteHandler;
-use wcf\system\WCF;
-use wcf\util\HeaderUtil;
-use wcf\util\PasswordUtil;
-
-/**
- * Shows the master password form.
- *
- * @author  Marcel Werk
- * @copyright   2001-2019 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core\Acp\Form
- * @deprecated 5.4 The master password is deprecated in favor of proper MFA (https://github.com/WoltLab/WCF/issues/3698).
- */
-class MasterPasswordForm extends AbstractForm
-{
-    /**
-     * master password
-     * @var string
-     */
-    public $masterPassword = '';
-
-    /**
-     * forward url
-     * @var string
-     */
-    public $url = '';
-
-    /**
-     * @inheritDoc
-     */
-    public function readParameters()
-    {
-        parent::readParameters();
-
-        if (\file_exists(WCF_DIR . 'acp/masterPassword.inc.php')) {
-            require_once(WCF_DIR . 'acp/masterPassword.inc.php');
-        } else {
-            HeaderUtil::redirect(LinkHandler::getInstance()->getLink('MasterPasswordInit'));
-
-            exit;
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function readFormParameters()
-    {
-        parent::readFormParameters();
-
-        if (isset($_POST['masterPassword'])) {
-            $this->masterPassword = $_POST['masterPassword'];
-        }
-        if (isset($_POST['url'])) {
-            $this->url = $_POST['url'];
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function validate()
-    {
-        parent::validate();
-
-        if (empty($this->masterPassword)) {
-            throw new UserInputException('masterPassword');
-        }
-
-        // check password
-        if (!\hash_equals(MASTER_PASSWORD, PasswordUtil::getDoubleSaltedHash($this->masterPassword, MASTER_PASSWORD))) {
-            throw new UserInputException('masterPassword', 'invalid');
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function save()
-    {
-        parent::save();
-
-        // update session
-        WCF::getSession()->register('masterPassword', 1);
-        WCF::getSession()->update();
-        WCF::getSession()->disableUpdate();
-
-        // forward
-        if (empty($this->url)) {
-            $this->url = LinkHandler::getInstance()->getLink();
-        }
-        HeaderUtil::redirect($this->url);
-
-        exit;
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function readData()
-    {
-        parent::readData();
-
-        if (empty($_POST) && \mb_strpos(WCF::getSession()->requestURI, 'MasterPassword') === false) {
-            // The request URI on it's own is not sufficient for environments that use different subdomains.
-            $protocol = RouteHandler::secureConnection() ? 'https' : 'http';
-            $this->url = $protocol . '://' . $_SERVER['HTTP_HOST'] . WCF::getSession()->requestURI;
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function assignVariables()
-    {
-        parent::assignVariables();
-
-        WCF::getTPL()->assign([
-            'masterPassword' => $this->masterPassword,
-            'relativeWcfDir' => RELATIVE_WCF_DIR,
-            'url' => $this->url,
-        ]);
-    }
-}
diff --git a/wcfsetup/install/files/lib/acp/form/MasterPasswordInitForm.class.php b/wcfsetup/install/files/lib/acp/form/MasterPasswordInitForm.class.php
deleted file mode 100755 (executable)
index 7388d7a..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-<?php
-
-namespace wcf\acp\form;
-
-use wcf\form\AbstractForm;
-use wcf\system\exception\IllegalLinkException;
-use wcf\system\exception\UserInputException;
-use wcf\system\io\File;
-use wcf\system\Regex;
-use wcf\system\WCF;
-use wcf\util\FileUtil;
-use wcf\util\PasswordUtil;
-
-/**
- * Shows the master password init form.
- *
- * @author  Marcel Werk
- * @copyright   2001-2019 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core\Acp\Form
- * @deprecated 5.4 The master password is deprecated in favor of proper MFA (https://github.com/WoltLab/WCF/issues/3698).
- */
-class MasterPasswordInitForm extends MasterPasswordForm
-{
-    /**
-     * master password confirm
-     * @var string
-     */
-    public $confirmMasterPassword = '';
-
-    /**
-     * @inheritDoc
-     */
-    public function readParameters()
-    {
-        AbstractForm::readParameters();
-
-        if (\file_exists(WCF_DIR . 'acp/masterPassword.inc.php')) {
-            require_once(WCF_DIR . 'acp/masterPassword.inc.php');
-
-            if (\defined('MASTER_PASSWORD')) {
-                throw new IllegalLinkException();
-            }
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function readFormParameters()
-    {
-        parent::readFormParameters();
-
-        if (isset($_POST['confirmMasterPassword'])) {
-            $this->confirmMasterPassword = $_POST['confirmMasterPassword'];
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function validate()
-    {
-        AbstractForm::validate();
-
-        if (empty($this->masterPassword)) {
-            throw new UserInputException('masterPassword');
-        }
-
-        // check password security
-        if (\mb_strlen($this->masterPassword) < 12) {
-            throw new UserInputException('masterPassword', 'notSecure');
-        }
-        // digits
-        if (!Regex::compile('\d')->match($this->masterPassword)) {
-            throw new UserInputException('masterPassword', 'notSecure');
-        }
-        // latin characters (lower-case)
-        if (!Regex::compile('[a-z]')->match($this->masterPassword)) {
-            throw new UserInputException('masterPassword', 'notSecure');
-        }
-        // latin characters (upper-case)
-        if (!Regex::compile('[A-Z]')->match($this->masterPassword)) {
-            throw new UserInputException('masterPassword', 'notSecure');
-        }
-
-        // password equals username
-        if ($this->masterPassword == WCF::getUser()->username) {
-            throw new UserInputException('masterPassword', 'notSecure');
-        }
-
-        // confirm master password
-        if (empty($this->confirmMasterPassword)) {
-            throw new UserInputException('confirmMasterPassword');
-        }
-
-        if ($this->confirmMasterPassword != $this->masterPassword) {
-            throw new UserInputException('confirmMasterPassword', 'notEqual');
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function save()
-    {
-        // write master password file
-        $file = new File(WCF_DIR . 'acp/masterPassword.inc.php');
-        $file->write("<?php
-/** MASTER PASSWORD STORAGE
-DO NOT EDIT THIS FILE */
-define('MASTER_PASSWORD', '" . PasswordUtil::getDoubleSaltedHash($this->masterPassword) . "');
-?>");
-        $file->close();
-        FileUtil::makeWritable(WCF_DIR . 'acp/masterPassword.inc.php');
-
-        parent::save();
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function assignVariables()
-    {
-        parent::assignVariables();
-
-        WCF::getTPL()->assign([
-            'confirmMasterPassword' => $this->confirmMasterPassword,
-            'exampleMasterPassword' => PasswordUtil::getRandomPassword(16),
-            'relativeWcfDir' => RELATIVE_WCF_DIR,
-        ]);
-    }
-}
index 3ce2eb46bce8a90aaa688490a26917d8433a2a66..4ff8836dd2a95222e87248a45663cdecef3d0b0f 100644 (file)
@@ -9,7 +9,6 @@ use wcf\system\exception\IllegalLinkException;
 use wcf\system\menu\acp\ACPMenu;
 use wcf\system\style\StyleHandler;
 use wcf\system\WCF;
-use wcf\system\WCFACP;
 use wcf\util\StringUtil;
 
 /**
@@ -136,11 +135,6 @@ class OptionForm extends AbstractOptionListForm
         // check permission
         WCF::getSession()->checkPermissions(['admin.configuration.canEditOption']);
 
-        if ($this->category->categoryName == 'module') {
-            // check master password
-            WCFACP::checkMasterPassword();
-        }
-
         // show form
         parent::show();
     }
index 669c05633c329660501f9f6ed622a964289e9847..68d299ea7599b47ac240855fc683f15f2e28d57d 100755 (executable)
@@ -14,7 +14,6 @@ use wcf\system\package\PackageInstallationDispatcher;
 use wcf\system\package\validation\PackageValidationException;
 use wcf\system\package\validation\PackageValidationManager;
 use wcf\system\WCF;
-use wcf\system\WCFACP;
 use wcf\util\FileUtil;
 
 /**
@@ -252,9 +251,6 @@ class PackageStartInstallForm extends AbstractForm
             throw new PermissionDeniedException();
         }
 
-        // check master password
-        WCFACP::checkMasterPassword();
-
         parent::show();
     }
 }
index 7a7f935baae7f8f072f98191fe7a72f8cbb0825f..30d54df781d5068d33783c87bbad61dd45163cdd 100755 (executable)
@@ -9,7 +9,6 @@ use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
 use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
-use wcf\system\WCFACP;
 use wcf\util\StringUtil;
 use wcf\util\Url;
 
@@ -166,15 +165,4 @@ class PackageUpdateServerAddForm extends AbstractForm
             'action' => 'add',
         ]);
     }
-
-    /**
-     * @inheritDoc
-     */
-    public function show()
-    {
-        // check master password
-        WCFACP::checkMasterPassword();
-
-        parent::show();
-    }
 }
index cf073030f8c1298f991f3c27aa55b09fff5ae8e6..a8504c2749477e23e1ff846b5f6c840a6dcbce83 100755 (executable)
@@ -9,7 +9,6 @@ use wcf\system\language\I18nHandler;
 use wcf\system\option\user\group\UserGroupOptionHandler;
 use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
-use wcf\system\WCFACP;
 use wcf\util\StringUtil;
 
 /**
@@ -272,16 +271,4 @@ class UserGroupAddForm extends AbstractOptionListForm
             'requireMultifactor' => $this->requireMultifactor,
         ]);
     }
-
-    /**
-     * @inheritDoc
-     */
-    public function show()
-    {
-        // check master password
-        WCFACP::checkMasterPassword();
-
-        // show form
-        parent::show();
-    }
 }
index da4764022130a3affa7c3598cccd0de34fb83cec..6a11d77a98009fe3a89aa81fae4685f6fd6a7597 100644 (file)
@@ -17,7 +17,6 @@ use wcf\system\exception\UserInputException;
 use wcf\system\option\user\group\IUserGroupGroupOptionType;
 use wcf\system\option\user\group\IUserGroupOptionType;
 use wcf\system\WCF;
-use wcf\system\WCFACP;
 
 /**
  * Shows the user group option form to edit a single option.
@@ -314,17 +313,6 @@ class UserGroupOptionForm extends AbstractForm
         ]);
     }
 
-    /**
-     * @inheritDoc
-     */
-    public function show()
-    {
-        // check master password
-        WCFACP::checkMasterPassword();
-
-        parent::show();
-    }
-
     /**
      * Validates object options and permissions.
      *
index e1bff0da044d4b2c8b55702e51ce845aa7fefd81..8789c0fc5b28a9cb7c55b4509c42069d109b9721 100644 (file)
@@ -8,7 +8,6 @@ use wcf\system\exception\IllegalLinkException;
 use wcf\system\package\PackageInstallationDispatcher;
 use wcf\system\package\validation\PackageValidationManager;
 use wcf\system\WCF;
-use wcf\system\WCFACP;
 
 /**
  * Shows a confirmation page prior to start installing.
@@ -111,15 +110,4 @@ class PackageInstallationConfirmPage extends AbstractPage
             'installingImportedStyle' => $this->installingImportedStyle,
         ]);
     }
-
-    /**
-     * @inheritDoc
-     */
-    public function show()
-    {
-        // check master password
-        WCFACP::checkMasterPassword();
-
-        parent::show();
-    }
 }
index a40808c9a08868001f1fa40cfabfe7fc353b1faf..306ef4a3477b30190f53ce037e6e94c1203a094f 100644 (file)
@@ -5,7 +5,6 @@ namespace wcf\acp\page;
 use wcf\page\AbstractPage;
 use wcf\system\package\PackageUpdateDispatcher;
 use wcf\system\WCF;
-use wcf\system\WCFACP;
 
 /**
  * Shows the package update confirmation form.
@@ -54,15 +53,4 @@ class PackageUpdatePage extends AbstractPage
             'availableUpdates' => $this->availableUpdates,
         ]);
     }
-
-    /**
-     * @inheritDoc
-     */
-    public function show()
-    {
-        // check master password
-        WCFACP::checkMasterPassword();
-
-        parent::show();
-    }
 }
index 78fd4d703fb91d74cd1c5c4382e41164277e49c2..27c90094864e8b9d2313d8324c77fd0aab4fd8ac 100644 (file)
@@ -466,6 +466,10 @@ class WCF
         // Cover photos are always enabled since 5.4.
         // https://github.com/WoltLab/WCF/issues/3902
         \define('MODULE_USER_COVER_PHOTO', 1);
+
+        // The master password has been removed since 5.5.
+        // https://github.com/WoltLab/WCF/issues/3913
+        \define('MODULE_MASTER_PASSWORD', 0);
     }
 
     /**
index 018707978fdaaa94a505cf55e807df08918395b5..f257053780946c9ce360082b80d3448017d5b473 100644 (file)
@@ -2,8 +2,6 @@
 
 namespace wcf\system;
 
-use wcf\acp\form\MasterPasswordForm;
-use wcf\acp\form\MasterPasswordInitForm;
 use wcf\data\menu\Menu;
 use wcf\data\menu\MenuCache;
 use wcf\system\application\ApplicationHandler;
@@ -288,29 +286,6 @@ class WCFACP extends WCF
      */
     public static function checkMasterPassword()
     {
-        if (
-            \defined('MODULE_MASTER_PASSWORD')
-            && MODULE_MASTER_PASSWORD == 1
-            && !WCF::getSession()->getVar('masterPassword')
-        ) {
-            if (ENABLE_ENTERPRISE_MODE && WCF::getUser()->hasOwnerAccess()) {
-                return;
-            }
-
-            if (\file_exists(WCF_DIR . 'acp/masterPassword.inc.php')) {
-                require_once(WCF_DIR . 'acp/masterPassword.inc.php');
-            }
-            if (\defined('MASTER_PASSWORD')) {
-                $form = new MasterPasswordForm();
-                $form->__run();
-
-                exit;
-            } else {
-                $form = new MasterPasswordInitForm();
-                $form->__run();
-
-                exit;
-            }
-        }
+        // Does nothing. The master password has been removed since version 5.5.
     }
 }
index 5d6bc90e76c82decf70930dba27fc5e152c5eb2e..283e2664b24d2621b0706aa00fce20c5a4d86558 100644 (file)
@@ -38,7 +38,6 @@ use wcf\util\XML;
 \define('PACKAGE_ID', 0);
 \define('HTTP_SEND_X_FRAME_OPTIONS', 0);
 \define('CACHE_SOURCE_TYPE', 'disk');
-\define('MODULE_MASTER_PASSWORD', 1);
 \define('ENABLE_DEBUG_MODE', 1);
 \define('ENABLE_BENCHMARK', 0);
 \define('ENABLE_ENTERPRISE_MODE', 0);
@@ -1338,7 +1337,6 @@ class WCFSetup extends WCF
         $factory->load();
 
         SessionHandler::getInstance()->changeUser($admin);
-        SessionHandler::getInstance()->register('masterPassword', 1);
         SessionHandler::getInstance()->register('__wcfSetup_developerMode', self::$developerMode);
         SessionHandler::getInstance()->register('__wcfSetup_directories', self::$directories);
         SessionHandler::getInstance()->register('__wcfSetup_imagick', ImagickImageAdapter::isSupported());
index e5a7210d9b90dcc7f80d557689c230667395b1d8..35d82f0f1d1152d8779264391c37cfd414c66258 100644 (file)
@@ -29,7 +29,6 @@ if (\file_exists(WCF_DIR . 'cookiePrefix.txt')) {
 
 \define('CACHE_SOURCE_TYPE', 'disk');
 \define('IMAGE_ADAPTER_TYPE', 'gd');
-\define('MODULE_MASTER_PASSWORD', 0);
 \define('TIMEZONE', 'Europe/Berlin');
 
 \define('ENABLE_DEBUG_MODE', 1);
index d4ae44c83298672d88369e91e3f62f22ebf62192..6ad67afc623f83b3dde75e7f3a1310002b9c783d 100644 (file)
@@ -1055,20 +1055,6 @@ ACHTUNG: Die oben genannten Meldungen sind stark gekürzt. Sie können Details z
                <item name="wcf.acp.language.add.package"><![CDATA[Paket]]></item>
                <item name="wcf.acp.language.add.package.description"><![CDATA[Die importierten Texte werden dem ausgewählten Paket zugeordnet.]]></item>
        </category>
-       <category name="wcf.acp.masterPassword">
-               <item name="wcf.acp.masterPassword"><![CDATA[Hauptkennwort]]></item>
-               <item name="wcf.acp.masterPassword.confirm"><![CDATA[Hauptkennwort wiederholen]]></item>
-               <item name="wcf.acp.masterPassword.enter"><![CDATA[Hauptkennwort erforderlich]]></item>
-               <item name="wcf.acp.masterPassword.enter.description"><![CDATA[Die aufgerufene Seite oder Aktion erfordert aus Sicherheitsgründen die Eingabe des Hauptkennwortes. Pro Sitzung ist die Eingabe des Hauptkennwortes nur einmal erforderlich. Falls {if LANGUAGE_USE_INFORMAL_VARIANT}du{else}Sie{/if} das Hauptkennwort vergessen haben {if LANGUAGE_USE_INFORMAL_VARIANT}solltest{else}sollten{/if}, {if LANGUAGE_USE_INFORMAL_VARIANT}kannst du{else}können Sie{/if} es zurücksetzen, indem {if LANGUAGE_USE_INFORMAL_VARIANT}du{else}Sie{/if} die Datei <em>{@$relativeWcfDir}acp/masterPassword.inc.php</em> {if LANGUAGE_USE_INFORMAL_VARIANT}löschst{else}löschen{/if}.]]></item>
-               <item name="wcf.acp.masterPassword.error.notEqual"><![CDATA[Die eingegebenen Kennwörter sind nicht identisch.]]></item>
-               <item name="wcf.acp.masterPassword.error.notSecure"><![CDATA[Das Kennwort wurde als unsicher eingestuft. Das Kennwort sollte mindestens acht Zeichen lang sein, große und kleine lateinische Buchstaben, Zahlen und Sonderzeichen enthalten. Es darf nicht mit den Kennwörtern von anderen Administratoren übereinstimmen.]]></item>
-               <item name="wcf.acp.masterPassword.error.invalid"><![CDATA[Das Hauptkennwort ist nicht korrekt. Falls {if LANGUAGE_USE_INFORMAL_VARIANT}du{else}Sie{/if} das Hauptkennwort vergessen haben {if LANGUAGE_USE_INFORMAL_VARIANT}solltest{else}sollten{/if}, {if LANGUAGE_USE_INFORMAL_VARIANT}kannst du{else}können Sie{/if} es zurücksetzen, indem {if LANGUAGE_USE_INFORMAL_VARIANT}du{else}Sie{/if} die Datei <em>{@$relativeWcfDir}acp/masterPassword.inc.php</em> {if LANGUAGE_USE_INFORMAL_VARIANT}löschst{else}löschen{/if}.]]></item>
-               <item name="wcf.acp.masterPassword.example"><![CDATA[Vorschlag]]></item>
-               <item name="wcf.acp.masterPassword.example.set"><![CDATA[Vorschlag übernehmen]]></item>
-               <item name="wcf.acp.masterPassword.init"><![CDATA[Hauptkennwort festlegen]]></item>
-               <item name="wcf.acp.masterPassword.init.description"><![CDATA[Das Hauptkennwort ist ein zusätzlicher Schutz für sicherheitskritische Funktionen. {if LANGUAGE_USE_INFORMAL_VARIANT}Du solltest{else}Sie sollten{/if} ein möglichst sicheres Kennwort verwenden, dass sich von {if LANGUAGE_USE_INFORMAL_VARIANT}deinem{else}Ihrem{/if} regulären Administrator-Kennwort unterscheidet, Dritten nicht bekannt ist und auch nicht auf anderen Internetseiten verwendet wird.]]></item>
-               <item name="wcf.acp.masterPassword.enter.deprecated"><![CDATA[Die Unterstützung für das Hauptkennwort ist obsolet und wird in einer zukünftigen Version ohne weiteren Hinweis entfernt. Die <a href="{link controller='AccountSecurity' forceFrontend=true application='wcf'}#section_multifactor{/link}">Mehrfaktor-Authentifizierung</a> schützt Benutzerkonten zuverlässiger und in allen Bereichen. Falls gewünscht, können einzelne Benutzergruppen verpflichtet werden, die Mehrfaktor-Authentifizierung einzurichten, bevor diese sensible Bereiche, wie beispielsweise die Administrationsoberfläche betreten können.]]></item>
-       </category>
        <category name="wcf.acp.menu">
                <item name="wcf.acp.menu.link.management"><![CDATA[Verwaltung]]></item>
                <item name="wcf.acp.menu.link.maintenance"><![CDATA[Wartung]]></item>
@@ -1382,8 +1368,6 @@ ACHTUNG: Die oben genannten Meldungen sind stark gekürzt. Sie können Details z
                <item name="wcf.acp.option.meta_description"><![CDATA[Meta Description]]></item>
                <item name="wcf.acp.option.og_image"><![CDATA[Standardwert „Open Graph“-Bild]]></item>
                <item name="wcf.acp.option.og_image.description"><![CDATA[Pfad zur Bilddatei, die beim Verlinken von Inhalten auf Facebook, Twitter und anderen „Social Media“-Seiten standardmäßig eingebunden wird.]]></item>
-               <item name="wcf.acp.option.module_master_password"><![CDATA[Hauptkennwort aktivieren (obsolet)]]></item>
-               <item name="wcf.acp.option.module_master_password.description"><![CDATA[Von der Verwendung des Hauptkennworts wird abgeraten. Stattdessen sollte die Mehrfaktor-Authentifizierung genutzt werden. Diese schützt Benutzerkonten zuverlässiger und in allen Bereichen. Die Unterstützung für das Hauptkennwort wird in einer zukünftigen Version ohne weiteren Hinweis entfernt.]]></item>
                <item name="wcf.acp.option.page_description"><![CDATA[Seitenbeschreibung]]></item>
                <item name="wcf.acp.option.page_title"><![CDATA[Titel der Seite]]></item>
                <item name="wcf.acp.option.proxy_server_http"><![CDATA[Proxy-Server (HTTP)]]></item>
@@ -5541,4 +5525,20 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|lang
                <item name="wcf.upload.error.uploadFailed"><![CDATA[Beim Hochladen der Datei ist ein unbekannter Fehler aufgetreten.]]></item>
        </category>
 </import>
+<delete>
+       <item name="wcf.acp.masterPassword"/>
+       <item name="wcf.acp.masterPassword.confirm"/>
+       <item name="wcf.acp.masterPassword.enter"/>
+       <item name="wcf.acp.masterPassword.enter.description"/>
+       <item name="wcf.acp.masterPassword.error.notEqual"/>
+       <item name="wcf.acp.masterPassword.error.notSecure"/>
+       <item name="wcf.acp.masterPassword.error.invalid"/>
+       <item name="wcf.acp.masterPassword.example"/>
+       <item name="wcf.acp.masterPassword.example.set"/>
+       <item name="wcf.acp.masterPassword.init"/>
+       <item name="wcf.acp.masterPassword.init.description"/>
+       <item name="wcf.acp.masterPassword.enter.deprecated"/>
+       <item name="wcf.acp.option.module_master_password"/>
+       <item name="wcf.acp.option.module_master_password.description"/>
+</delete>
 </language>
index 1c6f3245aa4da056a13ac57c24cf00f005f16768..a3c0e29974c60480a9738be275755fb589fd84bf 100644 (file)
@@ -1033,20 +1033,6 @@ ATTENTION: The messages listed above are greatly shortened. You can view details
                <item name="wcf.acp.language.add.package"><![CDATA[Package]]></item>
                <item name="wcf.acp.language.add.package.description"><![CDATA[The imported phrases will be assigned to the selected package.]]></item>
        </category>
-       <category name="wcf.acp.masterPassword">
-               <item name="wcf.acp.masterPassword"><![CDATA[Master Password]]></item>
-               <item name="wcf.acp.masterPassword.confirm"><![CDATA[Confirm Master Password]]></item>
-               <item name="wcf.acp.masterPassword.enter"><![CDATA[Master Password Required]]></item>
-               <item name="wcf.acp.masterPassword.enter.description"><![CDATA[The page or action requires the master password for security reasons, the password will be remembered for your current session. In case you forgot the password, please reset it by removing the file <em>{@$relativeWcfDir}acp/masterPassword.inc.php</em>.]]></item>
-               <item name="wcf.acp.masterPassword.error.invalid"><![CDATA[The password is incorrect. In case you forgot the password, please reset it by removing the file <em>{@$relativeWcfDir}acp/masterPassword.inc.php</em>.]]></item>
-               <item name="wcf.acp.masterPassword.error.notEqual"><![CDATA[The passwords do not match.]]></item>
-               <item name="wcf.acp.masterPassword.error.notSecure"><![CDATA[The password is considered unsafe. It should be at least 8 characters, containing uppercase and lowercase letters, numbers, and special symbols.]]></item>
-               <item name="wcf.acp.masterPassword.example"><![CDATA[Suggestion]]></item>
-               <item name="wcf.acp.masterPassword.example.set"><![CDATA[Use Suggestion]]></item>
-               <item name="wcf.acp.masterPassword.init"><![CDATA[Set Master Password]]></item>
-               <item name="wcf.acp.masterPassword.init.description"><![CDATA[The master password is the last line of defense, protecting both critical settings and sensitive data. One should choose a rather strong password which is neither known to any 3rd party person nor re-used on other web pages.]]></item>
-               <item name="wcf.acp.masterPassword.enter.deprecated"><![CDATA[Support for the master password is discouraged and will be removed in a future version without further notice. The <a href="{link controller='AccountSecurity' forceFrontend=true application='wcf'}#section_multifactor{/link}">Multi-factor Authentication</a> protects accounts more reliably and in all areas. If desired, specific user groups can be required to set up multi-factor authentication, before they are able to enter sensitive areas, such as the Administration Control Panel.]]></item>
-       </category>
        <category name="wcf.acp.menu">
                <item name="wcf.acp.menu.link.management"><![CDATA[Management]]></item>
                <item name="wcf.acp.menu.link.maintenance"><![CDATA[Maintenance]]></item>
@@ -1360,8 +1346,6 @@ ATTENTION: The messages listed above are greatly shortened. You can view details
                <item name="wcf.acp.option.meta_description"><![CDATA[Meta Description]]></item>
                <item name="wcf.acp.option.og_image"><![CDATA[Open Graph Image]]></item>
                <item name="wcf.acp.option.og_image.description"><![CDATA[Path to the default image that will be displayed when sharing your site on Facebook, Twitter and other social media sites.]]></item>
-               <item name="wcf.acp.option.module_master_password"><![CDATA[Enable master password (Not Recommended)]]></item>
-               <item name="wcf.acp.option.module_master_password.description"><![CDATA[Use of the master password is discouraged. Instead multi-factor authentication should be set up. Multi-factor authentication protects accounts more reliably and in all areas. Support for the master password will be removed in a future version without further notice.]]></item>
                <item name="wcf.acp.option.page_description"><![CDATA[Page Description]]></item>
                <item name="wcf.acp.option.page_title"><![CDATA[Page Title]]></item>
                <item name="wcf.acp.option.proxy_server_http"><![CDATA[Proxy-Server (HTTP)]]></item>
@@ -5542,4 +5526,20 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|langu
                <item name="wcf.upload.error.uploadFailed"><![CDATA[An unknown error occurred during the upload.]]></item>
        </category>
 </import>
+<delete>
+       <item name="wcf.acp.masterPassword"/>
+       <item name="wcf.acp.masterPassword.confirm"/>
+       <item name="wcf.acp.masterPassword.enter"/>
+       <item name="wcf.acp.masterPassword.enter.description"/>
+       <item name="wcf.acp.masterPassword.error.notEqual"/>
+       <item name="wcf.acp.masterPassword.error.notSecure"/>
+       <item name="wcf.acp.masterPassword.error.invalid"/>
+       <item name="wcf.acp.masterPassword.example"/>
+       <item name="wcf.acp.masterPassword.example.set"/>
+       <item name="wcf.acp.masterPassword.init"/>
+       <item name="wcf.acp.masterPassword.init.description"/>
+       <item name="wcf.acp.masterPassword.enter.deprecated"/>
+       <item name="wcf.acp.option.module_master_password"/>
+       <item name="wcf.acp.option.module_master_password.description"/>
+</delete>
 </language>