summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-09-20 21:40:00 -0300
committershennetsind <ind@henn.et>2014-09-20 21:40:00 -0300
commit204a558402678ad1b120397ea5da20b5695842a7 (patch)
treead4682d86e556367259eaae29d04b32acf0e1699 /src
parentf806586acc2e34068b5e125661916caa594de04f (diff)
downloadhercules-204a558402678ad1b120397ea5da20b5695842a7.tar.gz
hercules-204a558402678ad1b120397ea5da20b5695842a7.tar.bz2
hercules-204a558402678ad1b120397ea5da20b5695842a7.tar.xz
hercules-204a558402678ad1b120397ea5da20b5695842a7.zip
Fixed Bug 7926
Login server will now reject login requests with empty userids. Special Thanks to Haruna, Kisuka! http://hercules.ws/board/tracker/issue-7926-login-and-password-empty/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r--src/login/login.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/login/login.c b/src/login/login.c
index c8e219602..828afb22b 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -995,6 +995,11 @@ int mmo_auth(struct login_session_data* sd, bool isServer) {
return result;// Failed to make account. [Skotlex].
}
}
+
+ if( len <= 0 ) { /** a empty password is fine, a userid is not. **/
+ ShowNotice("Empty userid (received pass: '%s', ip: %s)\n", sd->passwd, ip);
+ return 0; // 0 = Unregistered ID
+ }
if( !accounts->load_str(accounts, &acc, sd->userid) ) {
ShowNotice("Unknown account (account: %s, received pass: %s, ip: %s)\n", sd->userid, sd->passwd, ip);