} else {
$linkRenderer = $this->getLinkRenderer();
- $dbr = BotPassword::getDB( DB_SLAVE );
+ $dbr = BotPassword::getDB( DB_REPLICA );
$res = $dbr->select(
'bot_passwords',
[ 'bp_app_id' ],
] );
if ( $this->operation === 'insert' || !empty( $data['resetPassword'] ) ) {
- $this->password = PasswordFactory::generateRandomPasswordString(
- max( 32, $this->getConfig()->get( 'MinimalPasswordLength' ) )
- );
+ $this->password = BotPassword::generatePassword( $this->getConfig() );
$passwordFactory = new PasswordFactory();
$passwordFactory->init( RequestContext::getMain()->getConfig() );
$password = $passwordFactory->newFromPlaintext( $this->password );
$out->addWikiMsg(
'botpasswords-newpassword',
htmlspecialchars( $username . $sep . $this->par ),
- htmlspecialchars( $this->password )
+ htmlspecialchars( $this->password ),
+ htmlspecialchars( $username ),
+ htmlspecialchars( $this->par . $sep . $this->password )
);
$this->password = null;
}