Browse code

fix regular expression (was rejecting -)

Hanno Böck authored on15/12/2020 17:42:07
Showing1 changed files
... ...
@@ -243,7 +243,7 @@ function filter_ssh_key($key)
243 243
         system_failure("Ungültiger SSH-Key!");
244 244
     }
245 245
 
246
-    if ((count($keyparts) === 3) && (preg_match("/^[a-zA-Z0-9@.-_]+$/", $keyparts[2]) === 0)) {
246
+    if ((count($keyparts) === 3) && (preg_match("/^[a-zA-Z0-9@._-]+$/", $keyparts[2]) === 0)) {
247 247
         system_failure("Ungültige Zeichen im Kommentar des SSH-Keys!");
248 248
     }
249 249