<div class="gmail_quote">On Tue, Feb 16, 2010 at 4:38 PM, meetmecall <span dir="ltr"><<a href="mailto:info@meetmecall.nl">info@meetmecall.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have read the posts about the security issue and from what I<br>
understand there should be a check to make sure that the characters<br>
used are actually allowed. I wrote a very straightforward and not so<br>
rocket science kind of macro that will do the job I guess. Just two<br>
parameters, one with the allowed characters and one with the string to<br>
check. The allowed characters can be stored in a global variable if<br>
this set has a global character. It is just one extra line in the<br>
dialplan and a little bit extra cpu load.<br></blockquote></div><br>Doesn't the built-in function FILTER() already do this?<br><br>*CLI> core show function FILTER<br>*CLI><br><br> -= Info about function 'FILTER' =-<br>
<br>[Synopsis]<br>Filter the string to include only the allowed characters<br><br>[Description]<br>Permits all characters listed in <allowed-chars>, filtering all others outs.<br>In addition to literally listing the characters, you may also use ranges<br>
of characters (delimited by a '-'<br>Hexadecimal characters started with a '\x'(i.e. \x20)<br>Octal characters started with a '\0' (i.e. \040)<br>Also '\t','\n' and '\r' are recognized.<br>
NOTE: If you want the '-' character it needs to be prefixed with a '\'<br><br>[Syntax]<br>FILTER(allowed-chars,string)<br><br>[Arguments]<br>Not available<br><br>[See Also]<br>Not available<br><br><br clear="all">
<br>-- <br>Thanks,<br>--Warren Selby<br><a href="http://www.selbytech.com">http://www.selbytech.com</a><br>