diff options
author | robertabcd <robertabcd@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2014-08-14 00:15:43 +0800 |
---|---|---|
committer | robertabcd <robertabcd@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2014-08-14 00:15:43 +0800 |
commit | 95b9d44b8223e2c7e72565d8b96462f3e5501506 (patch) | |
tree | a90b5793f3a095955bb3820459b0bbfe2a940994 | |
parent | 7d976690b612c389bca7784523441e1d943422e7 (diff) | |
download | pttbbs-95b9d44b8223e2c7e72565d8b96462f3e5501506.tar pttbbs-95b9d44b8223e2c7e72565d8b96462f3e5501506.tar.gz pttbbs-95b9d44b8223e2c7e72565d8b96462f3e5501506.tar.bz2 pttbbs-95b9d44b8223e2c7e72565d8b96462f3e5501506.tar.lz pttbbs-95b9d44b8223e2c7e72565d8b96462f3e5501506.tar.xz pttbbs-95b9d44b8223e2c7e72565d8b96462f3e5501506.tar.zst pttbbs-95b9d44b8223e2c7e72565d8b96462f3e5501506.zip |
Make UF_SECURE_LOGIN changeable only when using secure connection.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@6065 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/include/proto.h | 1 | ||||
-rw-r--r-- | pttbbs/mbbsd/mbbsd.c | 6 | ||||
-rw-r--r-- | pttbbs/mbbsd/user.c | 6 |
3 files changed, 13 insertions, 0 deletions
diff --git a/pttbbs/include/proto.h b/pttbbs/include/proto.h index a7afa666..5df78828 100644 --- a/pttbbs/include/proto.h +++ b/pttbbs/include/proto.h @@ -410,6 +410,7 @@ void talk_request(int sig); int establish_talk_connection(const userinfo_t *uip); void my_talk(userinfo_t * uin, int fri_stat, char defact); int query_file_money(const fileheader_t *pfh); +int mbbsd_is_secure_connection(); /* menu */ void showtitle(const char *title, const char *mid); diff --git a/pttbbs/mbbsd/mbbsd.c b/pttbbs/mbbsd/mbbsd.c index e9d62469..b6dabd72 100644 --- a/pttbbs/mbbsd/mbbsd.c +++ b/pttbbs/mbbsd/mbbsd.c @@ -2163,5 +2163,11 @@ check_ban_and_load(int fd, struct ProgramOption *option, return 0; } +int +mbbsd_is_secure_connection() +{ + return is_secure_connection; +} + /* vim: sw=4 */ diff --git a/pttbbs/mbbsd/user.c b/pttbbs/mbbsd/user.c index e10bd1ac..bdd2bc57 100644 --- a/pttbbs/mbbsd/user.c +++ b/pttbbs/mbbsd/user.c @@ -537,6 +537,12 @@ void Customize(void) { /* normal pref */ key -= 'a'; + + if (masks1[key] == UF_SECURE_LOGIN && !mbbsd_is_secure_connection()) { + vmsg("您必須使用安全連線才能修改此設定"); + continue; + } + dirty = 1; pwcuToggleUserFlag(masks1[key]); continue; |