From 59ad42f086b631ffad0bb15b520addd1f7e1ba2b Mon Sep 17 00:00:00 2001 From: Adrian Dvergsdal Date: Sun, 22 Oct 2017 23:25:52 +0200 Subject: [PATCH] Less stricter username regex (but still POSIX) For more info See this answer: https://serverfault.com/a/578264 Relevant issue: https://github.com/atmoz/sftp/issues/94 --- entrypoint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint b/entrypoint index e5f2601..62b58df 100755 --- a/entrypoint +++ b/entrypoint @@ -7,7 +7,7 @@ userConfPathLegacy="/etc/sftp-users.conf" userConfFinalPath="/var/run/sftp/users.conf" # Extended regular expression (ERE) for arguments -reUser='[a-z_][a-z0-9._-]{0,31}' +reUser='[A-Za-z0-9._][A-Za-z0-9._-]{0,31}' # POSIX.1-2008 rePass='[^:]{0,255}' reUid='[[:digit:]]*' reGid='[[:digit:]]*'