Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Outbound rule is not working if one of attributes contains "hyphen" inside it

$
0
0

Hello,

My outbound rule is pretty simple, I just want to rewrite all <FORM elements "action" attribute with something else. It works fine if FORM element does not contain "accept-charset" attribute, if it does then rule would not work, it would not even consider this a FORM element at all (verified with Failed Requests Filter).

Here is the rule

<rule name="Add application prefix" preCondition="IsHTML" enabled="true"><match filterByTags="A, Form, Img, Input, Link, Script, CustomTags" customTags="Object Param Tag" pattern="^/(.*)" /><conditions logicalGrouping="MatchAll" trackAllCaptures="true"><add input="{URL}" pattern="^/(webmail|payroll|nettwarrior3)/.*" /></conditions><action type="Rewrite" value="/{C:1}/{R:1}" /></rule>

Here is the file which is being evaluated

<Form style="margin:0px" method="post" accept-charset="utf-8" action="/system/login/"><Form style="margin:0px" method="post" action="/system/login/ok?"><Form style="margin:0px" accept-charset="utf-8" method="post" action="/system/login/ok?><Form style="margin:0px" accept-charset="ISO-8859-1" method="post" action="/system/login/ok?"><Form style="margin:0px" acceptCCCCcharset="ISO-8859-1" method="post" action="/system/login/ok?"><Form style="margin:0px" whatever-asdasd="utf8" method="post" action="/system/login/ok?">

Here is how it looks like when it's rewritten

<Form style="margin:0px" method="post" accept-charset="utf-8" action="/system/login/"><Form style="margin:0px" method="post" action="/payroll/system/login/ok?"><Form style="margin:0px" accept-charset="utf-8" method="post" action="/system/login/ok?><Form style="margin:0px" accept-charset="ISO-8859-1" method="post" action="/system/login/ok?"><Form style="margin:0px" acceptCCCCcharset="ISO-8859-1" method="post" action="/payroll/system/login/ok?"><Form style="margin:0px" whatever-asdasd="utf8" method="post" action="/system/login/ok?">


Here is what FREB says about rewrite conditions 

So basically it sees only 2 FORM tags in file even though there are 6 of them. Any attribute having "-" inside it throws logic off. 
RuleName="Add application prefix", Precondition="IsHTML", PatternSyntax="Regex", Pattern="^/(.*)", Negate="false", StopProcessing="false", HasFilter="true", HasConditions="true", ActionType="Rewrite", ActionValue="/{C:1}/{R:1}", EvaluationsPerformed="2", EvaluationsSucceeded="2"


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>