---
meta:
  author: "csanders-git"
  enabled: true
  name: "920210.yaml"
  description: "Tests that trigger rule 920210"
tests:
  - test_title: 920210-1
    stages:
      - stage:
          input:
            dest_addr: "127.0.0.1"
            port: 80
            headers:
              User-Agent: "ModSecurity CRS 3 Tests"
              Host: "localhost"
              Connection: "keep-alive"
          output:
            no_log_contains: "id \"920210\""
  - test_title: 920210-2
    stages:
      - stage:
          input:
            dest_addr: "127.0.0.1"
            port: 80
            headers:
              User-Agent: "ModSecurity CRS 3 Tests"
              Host: "localhost"
              Connection: "keep-alive,keep-alive"
          output:
            log_contains: "id \"920210\""
  - test_title: 920210-3
    stages:
      - stage:
          input:
            dest_addr: "127.0.0.1"
            port: 80
            headers:
              User-Agent: "ModSecurity CRS 3 Tests"
              Host: "localhost"
              Connection: "keep-alive,close"
          output:
            log_contains: "id \"920210\""
  - test_title: 920210-4
    stages:
      - stage:
          input:
            dest_addr: "127.0.0.1"
            port: 80
            headers:
              User-Agent: "ModSecurity CRS 3 Tests"
              Host: "localhost"
              Connection: "close,close"
          output:
            log_contains: "id \"920210\""
  - test_title: 920210-5
    stages:
      - stage:
          input:
            dest_addr: "127.0.0.1"
            port: 80
            headers:
              User-Agent: "ModSecurity CRS 3 Tests"
              Host: "localhost"
              Connection: "User-Agent"
          output:
            no_log_contains: "id \"920210\""
  - test_title: 920210-6
    desc: Multiple/Conflicting Connection Header Data Found (920210)  from old modsec regressions
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
              Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
              Accept-Language: en-us,en;q=0.5
              Connection: keep-alive, keep-alive
              Host: localhost
              Keep-Alive: '300'
              Proxy-Connection: keep-alive
              User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv
            method: GET
            port: 80
            uri: /
            version: HTTP/1.1
          output:
            log_contains: id "920210"
  - test_title: 920210-7
    desc: Multiple/Conflicting Connection Header Data Found (920210)  from old modsec regressions
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
              Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
              Accept-Language: en-us,en;q=0.5
              Connection: close, close
              Host: localhost
              Keep-Alive: '300'
              Proxy-Connection: keep-alive
              User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv
            method: GET
            port: 80
            uri: /
            version: HTTP/1.1
          output:
            log_contains: id "920210"
