[asterisk-dev] [Code Review] Add regular expression blacklist filtering for manager events

Mark Michelson mmichelson at digium.com
Fri May 21 09:30:27 CDT 2010



> On 2010-05-21 00:06:31, Mark Michelson wrote:
> > /trunk/main/manager.c, line 744
> > <https://reviewboard.asterisk.org/r/673/diff/2/?file=10342#file10342line744>
> >
> >     I'm getting mixed messages from this diff. First off, we have this file-scoped list called all_filters, which contains every filter specified for each user. Then, each user also has a list of filters which contain the filters that were specified in that user's category in manager.conf.
> >     
> >     All regex matching appears to be using the all_filters list, and the user->filter is never used at all. This means that if user Alice has regex filter A specified and Bob has regex filter B specified, then Bob will receive events that match either regex A or  regex B. Same goes for Alice as well. It seems to me this is an oversight and that in reality, Alice should only get events that match regex A and Bob should only get events that match regex B.

The above comment should say that Bob will NOT receive events that match regex A or regex B. Sorry for any confusion.


- Mark


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/673/#review2052
-----------------------------------------------------------


On 2010-05-20 18:42:50, Jeff Peeler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/673/
> -----------------------------------------------------------
> 
> (Updated 2010-05-20 18:42:50)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> From the submitter:
> to allow better filtering of ami-events than configuring categories, I created an option "eventfilter" for manager-users. Events to be sent are matched against regexes specified in these options and are discarded if the regex matches (blacklisting).
> 
> 
> This addresses bug 14861.
>     https://issues.asterisk.org/view.php?id=14861
> 
> 
> Diffs
> -----
> 
>   /trunk/main/manager.c 264829 
> 
> Diff: https://reviewboard.asterisk.org/r/673/diff
> 
> 
> Testing
> -------
> 
> I ensured manager events are reported the same without filtering and works as expected with.
> 
> 
> Thanks,
> 
> Jeff
> 
>




More information about the asterisk-dev mailing list