Hi,
I’m new to iRule, but have decent scripting skills with Perl. As explained in the below link, i tried the first example. When i try to save my iRule, I get the below exception. Note: My BigIP Version is 11.4. Any help is much appreciated. https://devcentral.f5.com/articles/getting-started-with-irules-procedures.UvuktfldWht
Thanks, Gopi
Exception caught in LocalLB:
iControl:LocalLB/Rule::create() Exception: Common::OperationFailed primary_error_code : 17236305 (0x01070151) secondary_error_code : 0 error_string : 01070151:3: Rule [/Common/gp_temp_proc] error: /Common/gp_temp_proc:1: error: [undefined procedure: rule][rule encodeHTML { proc html_encode { str } { set encoded “” foreach char [split $str “”] { switch $char { “<” { append encoded “<” } “>” { append encoded “>” } “'” { append encoded “'” } {“} { append encoded “”” } “&” { append encoded “&” } default { append encoded $char } } } return $encoded } when RULE_INIT { iRule that calls the html_encode proc: set raw {some xss: < script > and sqli: ’ or 1==1 "}
log local0. “HTML encoded: [call html_encode $raw]” } }]