mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-12 19:55:14 +02:00
new capacity bits (#67)
This commit is contained in:
parent
afaffc0df6
commit
7d0e7320e2
261 changed files with 10591 additions and 231 deletions
15
tests/fixtures/header_injection/python/safe_subscript_set.py
vendored
Normal file
15
tests/fixtures/header_injection/python/safe_subscript_set.py
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Safe: request arg routed through `strip_crlf` (a registered
|
||||
# HEADER_INJECTION sanitizer) before the subscript-set, so
|
||||
# taint-header-injection stays clean.
|
||||
from flask import request, make_response
|
||||
|
||||
|
||||
def strip_crlf(raw):
|
||||
return raw.replace("\r", "").replace("\n", "")
|
||||
|
||||
|
||||
def handler():
|
||||
lang = request.args.get("lang")
|
||||
response = make_response("ok")
|
||||
response.headers["X-Forwarded-By"] = strip_crlf(lang)
|
||||
return response
|
||||
Loading…
Add table
Add a link
Reference in a new issue