Make unrestricted... unrestricted
This commit is contained in:
parent
c15f201d70
commit
19068de088
@ -311,7 +311,7 @@ struct adc_message* adc_msg_parse_verify(struct hub_user* u, const char* line, s
|
|||||||
if (!command)
|
if (!command)
|
||||||
return 0;
|
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));
|
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);
|
adc_msg_free(command);
|
||||||
|
@ -23,7 +23,7 @@ struct hub_info* g_hub = 0;
|
|||||||
|
|
||||||
/* FIXME: Flood control should be done in a plugin! */
|
/* FIXME: Flood control should be done in a plugin! */
|
||||||
#define CHECK_FLOOD(TYPE, WARN) \
|
#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) \
|
if (WARN) \
|
||||||
{ \
|
{ \
|
||||||
|
Loading…
Reference in New Issue
Block a user