Verification done? Try many + 6

This commit is contained in:
Frank
2026-01-16 22:57:45 +01:00
parent 23b12efeea
commit 16fa6a8405

View File

@@ -78,6 +78,21 @@ class EmailVerifier
if (isset($parts['port'])) {
$request->server->set('SERVER_PORT', $parts['port']);
}
// Force Request to re-calculate internal properties
$reflection = new \ReflectionObject($request);
foreach (['baseUrl', 'pathInfo', 'requestUri', 'method', 'format', 'session', 'locale', 'isHostValid', 'isForwardedValid'] as $propName) {
if ($reflection->hasProperty($propName)) {
$prop = $reflection->getProperty($propName);
$prop->setAccessible(true);
if ($propName === 'isHostValid' || $propName === 'isForwardedValid') {
$prop->setValue($request, true);
} else {
$prop->setValue($request, null);
}
}
}
if (isset($parts['path'])) {
$baseUrl = rtrim($parts['path'], '/');
$request->server->set('SCRIPT_NAME', $baseUrl . '/index.php');
@@ -89,8 +104,7 @@ class EmailVerifier
$request->server->set('REQUEST_URI', $baseUrl . $requestUri);
}
// Force Request to re-calculate internal properties
$reflection = new \ReflectionObject($request);
// Force Request to re-calculate internal properties again after path changes
foreach (['baseUrl', 'pathInfo', 'requestUri'] as $propName) {
if ($reflection->hasProperty($propName)) {
$prop = $reflection->getProperty($propName);