Jasig/cas — pull request #419 by mmoayyed (2014-04-09 08:00:06+00:00)
Title: CAS-1438: URL matching support for proxy validation

https://issues.jasig.org/browse/CAS-1438

This commit in general intends to improve verification of service urls in terms of encoding and case upon validation requests. It presents the following changes:

1. An option for a regex service to allow case-insensitive matching. By default case-sensitivity is turned on for backwards compatibility purposes.
2. When checking an ST to see if its issuance was against the same requesting service, the comparison of ids (urls) is now performed in a case-insensitive manner. Both ids (urls) are also first decoded before checking for equality in order to resolve encoding issues with `%20 vs. +` and likely other differences in encoding impls and specs.
3. Test cases to cover all above scenarios.

Note: I also had to joggle around the call to compile regex patterns for a service, since the new option for case-sensitivity could not be set at the time of setting the service pattern. I had to remove the dependency on the order of the calls. Currently, patterns are created for regex services only once, when the `matches()` call is to execute.