Files
postfixadmin/tests/PasswordRecoveryResponseTest.php
Rodrigo Cortés Cano e638095d58 Harden password recovery requests (#1130)
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
2026-08-29 14:55:49 +01:00

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);
}
}