added usermanagement

This commit is contained in:
jhartworks committed 2026-11-17 12:59:54 +01:00
1 parent 3acce4eaf8
commit 088d763ff6
17 files changed
+1850 -785

No files matched your search

+7 -2
View File
@@ -144,7 +144,10 @@ $earlyFailure->RetryWebHook();
check(isset($nativeHooks['/hook/nextfloor/34567']) && $earlyFailure->status === 102, 'Unavailable early WebHook Control must recover automatically');
// Verify that returned URLs reach the real dispatcher, including Symcon's SCRIPT_NAME fallback.
parse_str((string) parse_url(substr($link, 5), PHP_URL_QUERY), $_GET);
$_GET = [];
$browserToken = str_repeat('a', 64);
$_COOKIE = ['NFSC_Session_12345' => $browserToken];
$module->attributes['Sessions'] = json_encode([hash('sha256', $browserToken) => ['account' => '__console__', 'epoch' => $token, 'csrf' => 'fixture', 'expires' => time() + 3600, 'seen' => time()]]);
$_SERVER['REQUEST_URI'] = $hook . '/designer';
$process = new ReflectionMethod($module, 'ProcessHookData');
ob_start();
@@ -163,9 +166,11 @@ $process->invoke($module);
$fallback = ob_get_clean();
check(str_contains($fallback, 'window.__NEXTFLOOR_SYMCON__='), 'Dispatcher must accept SCRIPT_NAME when REQUEST_URI is absent');
$_GET['token'] = 'wrong-token';
$_COOKIE = [];
$_SERVER['SCRIPT_NAME'] = $hook . '/api';
ob_start();
$process->invoke($module);
$unauthorized = ob_get_clean();
check(http_response_code() === 403 && str_contains($unauthorized, 'forbidden'), 'Recovery must not bypass hook authentication');
check(http_response_code() === 401 && str_contains($unauthorized, 'authentication_required'), 'Recovery and legacy URL tokens must not bypass session authentication');
echo "OK: early registration, startup/update and delayed reset recovery, ongoing maintenance, titles, data preservation, routing and authentication\n";