diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-09-06 11:14:15 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-09-06 11:14:15 +0800 |
commit | 537280b4347274976943dda29eb6caaf72f96c03 (patch) | |
tree | d2426671d45a30152265599471a011c3a5da2180 | |
parent | e0824354c67944868329dd7ba6496f66efc7b8dd (diff) | |
download | pttbbs-537280b4347274976943dda29eb6caaf72f96c03.tar pttbbs-537280b4347274976943dda29eb6caaf72f96c03.tar.gz pttbbs-537280b4347274976943dda29eb6caaf72f96c03.tar.bz2 pttbbs-537280b4347274976943dda29eb6caaf72f96c03.tar.lz pttbbs-537280b4347274976943dda29eb6caaf72f96c03.tar.xz pttbbs-537280b4347274976943dda29eb6caaf72f96c03.tar.zst pttbbs-537280b4347274976943dda29eb6caaf72f96c03.zip |
blog security fix
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@1161 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/announce.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pttbbs/mbbsd/announce.c b/pttbbs/mbbsd/announce.c index c8f69baf..ac001d28 100644 --- a/pttbbs/mbbsd/announce.c +++ b/pttbbs/mbbsd/announce.c @@ -1133,8 +1133,16 @@ void BlogMain(int num) break; case '4':{ char hash[35]; + int i; getdata(16, 0, "請輸入該篇的雜湊值: ", hash, sizeof(hash), DOECHO); + for( i = 0 ; hash[i] != 0 ; ++i ) /* 前面用 getdata() 保證有 \0 */ + if( !islower(hash[i]) && !isnumber(hash[i]) ) + break; + if( i != 32 ){ + vmsg("輸入錯誤"); + break; + } if( hash[0] != 0 && getans("請確定刪除(Y/N)?[N] ") == 'y' ){ MYSQL mysql; |