From 4112b8111a8bb20bacaa030fb4cb2592202342d6 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Fri, 20 Mar 2009 16:40:34 +0100 Subject: [PATCH] Fix problems with clients sending multiple INF messages during the login stage. Only the first one will be checked. --- src/inf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/inf.c b/src/inf.c index 083b765..7ad2ff9 100644 --- a/src/inf.c +++ b/src/inf.c @@ -779,6 +779,16 @@ int hub_handle_info(struct user* user, const struct adc_message* cmd_unmodified) */ if (user_is_connecting(user)) { + /* + * Don't allow the user to send multiple INF messages in this stage! + * Since that can have serious side-effects. + */ + if (user->info) + { + adc_msg_free(cmd); + return 0; + } + int ret = hub_handle_info_login(user, cmd); if (ret < 0) {