diff options
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/char/char.c | 9 | ||||
-rw-r--r-- | src/char_sql/char.c | 6 |
3 files changed, 15 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 02aa53865..5a56255dc 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/04/20
+ * Char server will now ignore packet 0x65 for already authentified
+ accounts. [Skotlex]
* Added two columns to item_db: equip_script and unequip_script are scripts
that are executed once when the corresponding item is equipped or
unequipped respectively. [Skotlex]
diff --git a/src/char/char.c b/src/char/char.c index 3ca461610..b0a261f56 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -1876,7 +1876,7 @@ int parse_tologin(int fd) { for(i = 0; i < fd_max; i++) {
if (session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->account_id == RFIFOL(fd,2)) {
if (RFIFOB(fd,6) != 0) {
- WFIFOHEAD(i, 3);
+ WFIFOHEAD(i, 3);
WFIFOW(i,0) = 0x6c;
WFIFOB(i,2) = 0x42;
WFIFOSET(i,3);
@@ -3137,13 +3137,18 @@ int parse_char(int fd) { // memset(sd, 0, sizeof(struct char_session_data)); aCalloc does this [Skotlex]
strncpy(sd->email, "no mail", 40); // put here a mail without '@' to refuse deletion if we don't receive the e-mail
sd->connect_until_time = 0; // unknow or illimited (not displaying on map-server)
+ } else {
+ //Received again auth packet for already authentified account?? Discard it.
+ //TODO: Perhaps log this as a hack attempt?
+ RFIFOSKIP(fd,17);
+ break;
}
sd->account_id = RFIFOL(fd,2);
sd->login_id1 = RFIFOL(fd,6);
sd->login_id2 = RFIFOL(fd,10);
sd->sex = RFIFOB(fd,16);
// send back account_id
- WFIFOHEAD(fd, 4);
+ WFIFOHEAD(fd, 4);
WFIFOL(fd,0) = RFIFOL(fd,2);
WFIFOSET(fd,4);
// search authentification
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index c5ddc9790..ad51a2825 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -2981,7 +2981,13 @@ int parse_char(int fd) { CREATE(session[fd]->session_data, struct char_session_data, 1);
sd = (struct char_session_data*)session[fd]->session_data;
sd->connect_until_time = 0; // unknow or illimited (not displaying on map-server)
+ } else {
+ //Received again auth packet for already authentified account?? Discard it.
+ //TODO: Perhaps log this as a hack attempt?
+ RFIFOSKIP(fd,17);
+ break;
}
+
sd->account_id = RFIFOL(fd, 2);
sd->login_id1 = RFIFOL(fd, 6);
sd->login_id2 = RFIFOL(fd, 10);
|