diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-10 09:45:30 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-10 09:45:30 +0800 |
commit | 5c8759bc8b9c2906ef790a908c4085e231c83181 (patch) | |
tree | f93575e9ce55ea7ebfd283f706bcb27b81e0d5dd | |
parent | 30d65894720e4d9257e981fe3c53f8da510dd193 (diff) | |
download | pttbbs-5c8759bc8b9c2906ef790a908c4085e231c83181.tar pttbbs-5c8759bc8b9c2906ef790a908c4085e231c83181.tar.gz pttbbs-5c8759bc8b9c2906ef790a908c4085e231c83181.tar.bz2 pttbbs-5c8759bc8b9c2906ef790a908c4085e231c83181.tar.lz pttbbs-5c8759bc8b9c2906ef790a908c4085e231c83181.tar.xz pttbbs-5c8759bc8b9c2906ef790a908c4085e231c83181.tar.zst pttbbs-5c8759bc8b9c2906ef790a908c4085e231c83181.zip |
* support non-ascii in passwords(backward compatibility)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4536 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | daemon/logind/logind.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/daemon/logind/logind.c b/daemon/logind/logind.c index 43bbbc53..6c3357ca 100644 --- a/daemon/logind/logind.c +++ b/daemon/logind/logind.c @@ -178,7 +178,9 @@ login_ctx_handle(login_ctx *ctx, int c) return LOGIN_HANDLE_WAIT; } - if (!isascii(c) || !isprint(c) || + // XXX for backward compatibility, + // we'd support non-ASCII characters in PW. + if ( (isascii(c) && !isprint(c)) || l+1 >= sizeof(ctx->passwd)) return LOGIN_HANDLE_BEEP; |