tjg184 / urlrewritefilter

Automatically exported from code.google.com/p/urlrewritefilter
Other
0 stars 0 forks source link

Bad VariableReplacer regex, causing some vars to be ignored in the urlrewrite.xml file #182

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.set an attribute in the request containing either a number or a '.' char
2.add a rule like this one : <to 
type="proxy">http://%{attribute:s3.static.bucket}/bin/$1</to>
3.open an url matching this rule

What is the expected output? What do you see instead?
In 3.2, it used to replace the var with the correct value, instead, it does not 
expand the value of the var

What version of the product are you using? On what operating system?
UrlRewriteFilter 4.0.4

Please provide any additional information below.
The VariableReplacer var uses a bad regex : "(?<!\\\\)%\\{([-a-zA-Z:]*)\\}"
It should be bugfixed and tested

Original issue reported on code.google.com by lionel.b...@gmail.com on 20 Mar 2015 at 6:32