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. This ports the behavior of PR #1130 while preserving PHP 7.4 compatibility and the 4.x database boolean handling. 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);
|
|
}
|
|
}
|