[rt-devel] ReferrerWhitelist wildcard domain matching

Ruslan Zakirov ruz at bestpractical.com
Thu Jul 12 07:39:23 EDT 2012


On Thu, Jul 12, 2012 at 7:25 AM, Matt Tyson <mtyson at redhat.com> wrote:
> Hi,
>
> I've attached a patch against RT to do simple wildcard matching against
> domain names for the ReferrerWhitelist.  This is to avoid having to enter a
> domain and all of its subdomains manually.
>
> EG
>     domain.com:80
> foo.domain.com:80
> bar.domain.com:80
> baz.domain.com:80
>
> could be entered as
>
> *.domain.com:80
>
> Does anyone have any interest in this or any feedback?

I would rather prefer to be able to put a regular expression into the list.

if ( ref $config eq 'Regexp' ) {
   ... if $value =~ $config;
} else {
   ...
}

Also, if option is regexp then it's may be better to match it against
whole URL, so for example people can whitelist corp site, but not
xxx.com/forum/... URLs.

> Regards,
> Matt.
>
> --------
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>



-- 
Best regards, Ruslan.


More information about the rt-devel mailing list