]> git.ipfire.org Git - ipfire.org.git/commitdiff
accounts: Fix off-by-one error when checking username length
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 18 Nov 2019 11:15:37 +0000 (11:15 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 18 Nov 2019 11:15:37 +0000 (11:15 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/accounts.py

index ec29bcf564175c2d2b90c0199a1172e4616d2572..67bb18943e473f0d2447d9b5d2d29097f647cdc4 100644 (file)
@@ -128,7 +128,7 @@ class Accounts(Object):
 
        def uid_is_valid(self, uid):
                # UID must be at least four characters
-               if len(uid) <= 4:
+               if len(uid) < 4:
                        return False
 
                # https://unix.stackexchange.com/questions/157426/what-is-the-regex-to-validate-linux-users