Fix problems with clients sending multiple INF messages during the login stage. Only the first one will be checked.
This commit is contained in:
parent
1929f2fae7
commit
4112b8111a
10
src/inf.c
10
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))
|
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);
|
int ret = hub_handle_info_login(user, cmd);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue