mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
Require a validated canonical site_url for recovery links, keep responses uniform, and persist a five-minute per-account request limit. The token update is atomic across supported database engines and performs the same password hashing work for unknown accounts. Refs #1128 thanks @TrapoSAMA
15 lines
500 B
PHP
15 lines
500 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class PasswordRecoveryResponseTest extends TestCase
|
|
{
|
|
public function testRecoveryRequestDoesNotRevealDeliveryAvailability(): void
|
|
{
|
|
$controller = file_get_contents(__DIR__ . '/../public/users/password-recover.php');
|
|
|
|
$this->assertStringNotContainsString('Location: password-change.php?username=', $controller);
|
|
$this->assertStringContainsString("flash_info(Config::Lang('pPassword_recovery_processed'))", $controller);
|
|
}
|
|
}
|