Files
postfixadmin/tests/PasswordRecoveryResponseTest.php
Rodrigo Cortés Cano f29ac152fb 4.x: harden password recovery requests (#1136)
Require a validated canonical site_url for recovery links, keep responses uniform, and persist a five-minute per-account request limit.

This ports the behavior of PR #1130 while preserving PHP 7.4 compatibility and the 4.x database boolean handling.

Refs #1128

Thanks @TrapoSAMA
2026-09-02 20:29:26 +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);
}
}