(self)
| 447 | |
| 448 | |
| 449 | def check_path_traversal(self): |
| 450 | self.log.info("Check that path traversal attempts are safely rejected") |
| 451 | traversal_paths = [ |
| 452 | '/../etc/passwd', |
| 453 | '/../../etc/shadow', |
| 454 | '/%2e%2e/%2e%2e/etc/passwd', # URL-encoded dots |
| 455 | '/..%2Fetc%2Fpasswd', # URL-encoded slash |
| 456 | '/.%2e/.%2e/etc/passwd', # mixed encoding |
| 457 | '/valid/../../../etc/passwd', |
| 458 | ] |
| 459 | for path in traversal_paths: |
| 460 | conn = BitcoinHTTPConnection(self.node) |
| 461 | response = conn.get(path) |
| 462 | assert_equal(response.status, http.client.NOT_FOUND) |
| 463 | |
| 464 | |
| 465 | def check_request_smuggling_cl_te(self): |
no test coverage detected