title: Http request blocked by Azure WAF, how to do right encoding?
body: <p>I'm running a asp.net web application on Azure, I have an Application Gateway in front of it, enable the WAF (Web application Firewall).</p>
  
  <p>But many of my http requests from the front-end are blocked by the WAF, for example my payload in JSON:</p>
  
  <pre><code>[{"inputtype":"text","name":"wwwwww","memo":"","score":1,"sort":1,"isrequired":false,"allowseeresult":false,"choicenummin":null,"choicenummax":null,"options":[]}]
  </code></pre>
  
  <p>The error message is: </p>
  
  <pre><code>"message": "Warning. Pattern match \"((?: 
  [\\\\~\\\\!\\\\@\\\\#\\\\$\\\\%\\\\^\\\\&amp;\\\\*\\\\(\\\\)\\\\-\\\\+\\\\=\\\\ {\\\\}\\\\[\\\\]\\\\|\\\\:\\\\;\\\"\\\\'\\\\\\xc2\\xb4\\\\\\xe2\\x80\\x99\\\\\\xe2\\x80\\x98\\\\`\\\\&lt;\\\\&gt;][^\\\\~\\\\!\\\\@\\\\#\\\\$\\\\%\\\\^\\\\&amp;\\\\*\\\\(\\\\)\\\\-\\\\+\\\\=\\\\{\\\\}\\\\[\\\\]\\\\|\\\\:\\\\;\\\"\\\\'\\\\\\xc2\\xb4\\\\\\xe2\\x80\\x99\\\\\\xe2\\x80\\x98\\\\`\\\\&lt;\\\\&gt;]*?){12})\" at ARGS:questions.",
  "data": "Matched Data: [{\\x22inputtype\\x22:\\x22text\\x22,\\x22name\\x22:\\x22who is it\\x22 found within ARGS:questions: [{\\x22inputtype\\x22:\\x22text\\x22,\\x22name\\x22:\\x22who is it\\x22,\\x22memo\\x22:\\x22\\x22,\\x22score\\x22:1,\\x22sort\\x22:1,\\x22isrequired\\x22:true,\\x22allowseeresult\\x22:false,\\x22choicenummin\\x22:null,\\x22choicenummax\\x22:null,\\x22options\\x22:[]}]",
  "file": "rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf",
  "line": "1002"
  </code></pre>
  
  <p>Seems that "" is not allowed in the payload.</p>
  
  <p>I tried to use htmlencode to encode the "" to "&amp;quot ;"
  but the ";" still got blocked by WAF.</p>
  
  <p>So how should I encode my payload to avoid it being blocked?
  Any recommendations? Thanks.</p>