Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Can Regex expression be fetched dynamically from KVM?

Can Regex expression be fetched dynamically from KVM? Getting error at the time of deployment.

Below is the dynamic value fetched:

<RegularExpressionProtection name="RE-RegularExpression-Check"> 
  <DisplayName>RE-RegularExpression-Check</DisplayName> 
  <Properties/> 
  <Source>request</Source> 
  <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> 
  <Variable name="request.content"> 
    <Pattern ignoreCase="true">{sqlRegexPattern}</Pattern> 
  </Variable> 
</RegularExpressionProtection>

Below is the value present in KVM:

[\s]*((select)|(delete)|(exec)|(drop\s*table)|(insert)|(shutdown)|(update))

Please help!!!

Solved Solved
0 5 577
1 ACCEPTED SOLUTION

Nope.

The Pattern element does not accept a MessageTemplate .

If you wanted to dynamically load the regex, then you could do so using a JavaScript callout.

I don't understand the use case though. Why would you want this? Under what circumstances would the regex need to change dynamically?

View solution in original post

5 REPLIES 5