mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 15:29:05 +00:00
Restrict functionality when ACLs are misconfigured.
This patch has two main purposes: 1) Improve warning messages when ACLs are configured improperly. 2) Prevent misconfigured ACLs from allowing potentially unwanted traffic. To acomplish point (2) in most cases, whatever configuration object that the ACL belonged to was not allowed to load. The one exception is res_pjsip_acl. In that case, ACLs are their own configuration object. Furthermore, the module loading code has no indication that a ACL configuration had a failure. So the tactic taken here is to create an ACL that just blocks everything. ASTERISK-24969 Reported by Corey Farrell Change-Id: I2ebcb6959cefad03cea4d81401be946203fcacae
This commit is contained in:
@@ -479,7 +479,7 @@ void ast_append_acl(const char *sense, const char *stuff, struct ast_acl_list **
|
||||
AST_LIST_TRAVERSE(working_list, current, list) {
|
||||
if (!strcasecmp(current->name, tmp)) { /* ACL= */
|
||||
/* Inclusion of the same ACL multiple times isn't a catastrophic error, but it will raise the error flag and skip the entry. */
|
||||
ast_log(LOG_ERROR, "Named ACL '%s' is already included in the ast_acl container.", tmp);
|
||||
ast_log(LOG_ERROR, "Named ACL '%s' occurs multiple times in ACL definition. Please update your ACL configuration.", tmp);
|
||||
if (error) {
|
||||
*error = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user