From 59d16d1daa1748a056efc2317510fd3d541b7144 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 10 Jul 2017 06:49:41 +0200 Subject: [PATCH] login: emulate apache authentication to check admin login Send 401 response until user validates as admin (replacing ip whitelisting). Assume all users except for generic 'lid' are allowed. --- auth.inc.php | 46 ++++++++++++++++++++++++++++++++++++---------- foot.inc.php | 4 +++- login.php | 18 ++++++++++++++++++ 3 files changed, 57 insertions(+), 11 deletions(-) create mode 100644 login.php diff --git a/auth.inc.php b/auth.inc.php index 1a72379..6a5d1d2 100755 --- a/auth.inc.php +++ b/auth.inc.php @@ -1,12 +1,38 @@ '.N; - echo "Beheer toegestaan voor $editable:".N; + echo "Beheer toegestaan voor $User:".N; printf('%s'.N, $edit ? '' : 'edit', $edit ? 'lezen' : ($notfound ? 'aanmaken' : 'aanpassen') diff --git a/login.php b/login.php new file mode 100644 index 0000000..35dc55e --- /dev/null +++ b/login.php @@ -0,0 +1,18 @@ + +

Inloggen mislukt

+

Geen geldige login voor sitebeheer.

+ -- 2.30.0