From 998ab3e183e734bcbe99c44963a960c42fccae89 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 19 Jun 2018 18:54:43 +0200 Subject: [PATCH] login: replace unsupported characters in user names --- auth.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth.inc.php b/auth.inc.php index 2edfa7a..030a394 100644 --- a/auth.inc.php +++ b/auth.inc.php @@ -24,7 +24,7 @@ function login($inuser, $inpass = NULL) } # find password data by user name - $userdir = 'profile/'.strtolower($inuser); + $userdir = 'profile/'.preg_replace('/[^a-z0-9]+/', '-', strtolower($inuser)); $pwfile = "$userdir/.passwd"; if (!file_exists($pwfile)) return; $usertest = trim(file_get_contents($pwfile)); -- 2.30.0