nextcloud/all-in-one · error · InvalidSettingConfigurationException

Please enter your current password.

Error message

Please enter your current password.

What it means

First check in ConfigurationManager::changeMasterPassword(): the current-password field must be non-empty before anything else is validated. The controller invokes this method whenever the POST body contains 'current-master-password' or 'new-master-password'. Empty input throws InvalidSettingConfigurationException → HTTP 422 with this message in the AIO UI.

Source

Thrown at php/src/Data/ConfigurationManager.php:806

        if ($password === '') {
            throw new InvalidSettingConfigurationException("Please enter the password!");
        }

        $this->startTransaction();
        $this->borgBackupHostLocation = $location;
        $this->borgRemoteRepo = $repo;
        $this->borgRestorePassword = $password;
        $this->instanceRestoreAttempt = true;
        $this->commitTransaction();
    }

    /**
     * @throws InvalidSettingConfigurationException
     */
    public function changeMasterPassword(string $currentPassword, string $newPassword) : void {
        if ($currentPassword === '') {
            throw new InvalidSettingConfigurationException("Please enter your current password.");
        }

        if (!hash_equals($this->password, $currentPassword)) {
            throw new InvalidSettingConfigurationException("The entered current password is not correct.");
        }

        if ($newPassword === '') {
            throw new InvalidSettingConfigurationException("Please enter a new password.");
        }

        if (strlen($newPassword) < 24) {
            throw new InvalidSettingConfigurationException("New passwords must be >= 24 digits.");
        }

        if (!preg_match("#^[a-zA-Z0-9 ]+$#", $newPassword)) {
            throw new InvalidSettingConfigurationException('Not allowed characters in the new password.');
        }

View on GitHub (pinned to 6b788eec5e)

Solutions

  1. Fill in your current AIO login password (the one used to log into the AIO web interface)
  2. If the filled password is then rejected, see the 'The entered current password is not correct.' handling
  3. Paste carefully — leading/trailing whitespace counts as part of the value

Example fix

// before
current-master-password = ''
new-master-password = '<new password>'
// after
current-master-password = '<current AIO password>'
new-master-password = '<new password>'
Defensive patterns

Strategy: validation

Validate before calling

if (trim($currentPassword) === '') {
    $errors[] = 'Current password is required';
}

Try / catch

use AIO\Data\InvalidSettingConfigurationException;

try {
    $configurationManager->changeMasterPassword($currentPassword, $newPassword);
} catch (InvalidSettingConfigurationException $e) {
    $formErrors[] = $e->getMessage();
}

Prevention

When it happens

Trigger: Submitting the password-change form with 'current-master-password' blank while only filling the new password; the browser not autofilling the current field; scripted POSTs that include the new-password key but omit the current one.

Common situations: Users focusing on the new password and skipping the current one; password managers filling only one of the two fields.

Understand the failure class

Background: "Missing required field" and "field is required" errors: why libraries reject payloads that omit mandatory fields — this error's family across 20 libraries.

Related errors


AI-assisted analysis of nextcloud/all-in-one@6b788eec5e (2026-08-21). Data as JSON: /api/errors/5daad8c5dccb6589. Report an issue: GitHub.