Make unrestricted... unrestricted

This commit is contained in:
klondike 2014-04-04 05:16:35 +02:00 committed by Francisco Blas (klondike) Izquierdo Riera
parent c15f201d70
commit 19068de088
2 changed files with 2 additions and 2 deletions

View File

@ -311,7 +311,7 @@ struct adc_message* adc_msg_parse_verify(struct hub_user* u, const char* line, s
if (!command)
return 0;
if (command->source && (!u || command->source != u->id.sid))
if (command->source && (!u || command->source != u->id.sid || auth_cred_is_unrestricted(u->credentials)))
{
LOG_DEBUG("Command does not match user's SID (command->source=%d, user->id.sid=%d)", command->source, (u ? u->id.sid : 0));
adc_msg_free(command);

View File

@ -23,7 +23,7 @@ struct hub_info* g_hub = 0;
/* FIXME: Flood control should be done in a plugin! */
#define CHECK_FLOOD(TYPE, WARN) \
if (flood_control_check(&u->flood_ ## TYPE , hub->config->flood_ctl_ ## TYPE, hub->config->flood_ctl_interval, net_get_time())) \
if (flood_control_check(&u->flood_ ## TYPE , hub->config->flood_ctl_ ## TYPE, hub->config->flood_ctl_interval, net_get_time()) && !auth_cred_is_unrestricted(u->credentials)) \
{ \
if (WARN) \
{ \