From cda4c2d96b70c296ad97e4d9118aa55ea7c3a594 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 11 Jun 2016 16:29:18 +0200 Subject: krebs types.filename: maximize strictness --- krebs/4lib/types.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index b048f48d8..628555a9e 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -325,7 +325,7 @@ types // rec { # POSIX.1‐2013, 3.278 Portable Filename Character Set filename = mkOptionType { name = "POSIX filename"; - check = x: match "[0-9A-Za-z._-]+" x != null; + check = x: match "([0-9A-Za-z._])[0-9A-Za-z._-]*" x != null; merge = mergeOneOption; }; @@ -347,6 +347,6 @@ types // rec { # POSIX.1-2013, 3.431 User Name username = mkOptionType { name = "POSIX username"; - check = s: filename.check s && substring 0 1 s != "-"; + check = filename.check; }; } -- cgit v1.2.3