---
meta:
  author: "Christian Folini"
  enabled: true
  name: "920490.yaml"
  description: "Tests for the charset protection in combination with the x-up-devcap-post-charset header"
tests:
  - test_title: 920490-1
    stages:
      - stage:
          input:
            dest_addr: "127.0.0.1"
            port: 80
            method: "POST"
            headers:
              User-Agent: "UP ModSecurity CRS 3 Tests"
              Host: "localhost"
              Content-Type: "application/x-www-form-urlencoded; charset=utf-8"
              x-up-devcap-post-charset: "ibm500"
            data: "%89%95%97%A4%A3%F1=%A7%A7%A7%A7%A7%A7%A7"
          output:
            log_contains: "id \"920490\""
  - test_title: 920490-2
    stages:
      - stage:
          input:
            dest_addr: "127.0.0.1"
            port: 80
            method: "POST"
            headers:
              User-Agent: "ModSecurity CRS 3 Tests"
              Host: "localhost"
              Content-Type: "application/x-www-form-urlencoded; charset=utf-8"
              x-up-devcap-post-charset: "ibm500"
            data: "%89%95%97%A4%A3%F1=%A7%A7%A7%A7%A7%A7%A7"
          output:
            no_log_contains: "id \"920490\""
  - test_title: 920490-3
    stages:
      - stage:
          input:
            dest_addr: "127.0.0.1"
            port: 80
            method: "POST"
            headers:
              User-Agent: "UP ModSecurity CRS 3 Tests"
              Host: "localhost"
              Content-Type: "application/x-www-form-urlencoded; charset=utf-8"
            data: "%89%95%97%A4%A3%F1=%A7%A7%A7%A7%A7%A7%A7"
          output:
            no_log_contains: "id \"920490\""
