Merge pull request #325 from sroeder/master

Added @ character to the list of valid username characters.

* This allows login with "bad" username, even if shellinabox is configured to
  run with SSH service. For LOGIN service this was always possible.
This commit is contained in:
Luka Krajger 2015-07-21 18:43:27 +02:00
commit f8f937608c

View file

@ -1019,7 +1019,7 @@ static pam_handle_t *internalLogin(struct Service *service, struct Utmp *utmp,
if (!((ch >= '0' && ch <= '9') || if (!((ch >= '0' && ch <= '9') ||
(ch >= 'A' && ch <= 'Z') || (ch >= 'A' && ch <= 'Z') ||
(ch >= 'a' && ch <= 'z') || (ch >= 'a' && ch <= 'z') ||
ch == '-' || ch == '_' || ch == '.')) { ch == '-' || ch == '_' || ch == '.' || ch == '@')) {
goto invalid_user_name; goto invalid_user_name;
} }
} }