aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwinter Sparkles2026-08-09 15:51:51 +0100
committerwinter Sparkles2026-08-09 15:51:51 +0100
commit1dfaa74cb3a496ad1c8b4af366c79ddd91d53f20 (patch)
tree6102c59b30f6a76943820dca9069360ef38e7f33
parent96387025da63025894f6259f7eebed0fc6fc53ac (diff)
only allow /continue for non-primary domains
-rw-r--r--Psso/Router.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/Psso/Router.php b/Psso/Router.php
index db1f851..ba0dd53 100644
--- a/Psso/Router.php
+++ b/Psso/Router.php
@@ -39,6 +39,14 @@ class Router {
}
function dispatch(string $path) {
+ // actually check the hostname lol
+ if ($_SERVER['HTTP_HOST'] != $this->config['site']['primary-domain'] &&
+ $path != '/continue') {
+ header('Location: https://'
+ . $this->config['site']['primary-domain']);
+ return;
+ }
+
if (str_contains($path, '..')) {
$this->dealWithError(404, $path);
return;