From: Michael Tremer Date: Mon, 18 Nov 2019 11:15:37 +0000 (+0000) Subject: accounts: Fix off-by-one error when checking username length X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11c56bd2ccac1d6bd26ee3bc6883ebcf3a92b237;p=ipfire.org.git accounts: Fix off-by-one error when checking username length Signed-off-by: Michael Tremer --- diff --git a/src/backend/accounts.py b/src/backend/accounts.py index ec29bcf5..67bb1894 100644 --- a/src/backend/accounts.py +++ b/src/backend/accounts.py @@ -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