apps/password_policy/lib/PasswordValidator.php
/**
	 * Checks if password is within the 100,000 most used passwords.
	 *
	 * @param string $password
	 * @throws HintException
	 */
Checks if password is within the 100,000 most used passwords.
@param string $password
@throws HintException
Checks if password is within the 100 000 most used passwords . @param string $password @throws HintException
protected function checkCommonPasswords($password) {
		$enforceNonCommonPassword = $this->config->getEnforceNonCommonPassword();
		if($enforceNonCommonPassword) {
			$passwordFile = __DIR__ . '/../lists/list-'.strlen($password).'.php';
			if(file_exists($passwordFile)) {
				$commonPasswords = require_once $passwordFile;
				if (isset($commonPasswords[strtolower($password)])) {
					$message = 'Password is within the 1,000,000 most common passwords. Please choose another one.';
					$message_t = $this->l->t(
						'Password is within the 1,000,000 most common passwords. Please choose another one.'
					);
					throw new HintException($message, $message_t);
				}
			}
		}
	}
protected function checkCommonPasswords ( $ password ) { $ enforceNonCommonPassword = $ this -> config -> getEnforceNonCommonPassword ( ) ; if ( $ enforceNonCommonPassword ) { $ passwordFile = __DIR__ . '/../lists/list-' . strlen ( $ password ) . '.php' ; if ( file_exists ( $ passwordFile ) ) { $ commonPasswords = require_once $ passwordFile ; if ( isset ( $ commonPasswords [ strtolower ( $ password ) ] ) ) { $ message = 'Password is within the 1,000,000 most common passwords. Please choose another one.' ; $ message_t = $ this -> l -> t ( 'Password is within the 1,000,000 most common passwords. Please choose another one.' ) ; throw new HintException ( $ message , $ message_t ) ; } } } }
Checks if password is within the 100,000 most used passwords.
Checks if password is within the 100 000 most used passwords .