Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump falcon requirement to <5 #139

Merged
merged 4 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
trigger_extras = {"PyYAML<7", "lxml>=4.3.1", "mock==3.*"}
aiohttp_extras = {"aiohttp<4"} | trigger_extras
django_extras = {"Django<6"} | trigger_extras
falcon_extras = {"falcon<4", "falcon-multipart==0.2.0"} | trigger_extras
falcon_extras = {"falcon<5", "falcon-multipart==0.2.0"} | trigger_extras
flask_extras = {"Flask<4"} | trigger_extras
fastapi_extras = {
"fastapi<1",
Expand Down
4 changes: 2 additions & 2 deletions src/vulnpy/falcon/vulnerable.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ def _set_response(resp, path):
"""
Set the response body and Content-Type
"""
resp.body = get_template(path)
resp.text = get_template(path)
resp.content_type = "text/html"


def _set_xss_response(resp, path, user_input):
template = get_template(path)
template += "<p>XSS: " + user_input + "</p>"

resp.body = template
resp.text = template
resp.content_type = "text/html"
2 changes: 1 addition & 1 deletion tests/falcon/test_vulnerable.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@pytest.fixture(scope="module")
def client():
app = falcon.API()
app = falcon.App()
vulnpy.falcon.add_vulnerable_routes(app)
return testing.TestClient(app)

Expand Down
2 changes: 1 addition & 1 deletion tests/falcon/test_vulnerable_asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


@pytest.fixture(scope="module")
def client():
async def client():
app = falcon.asgi.App()
vulnpy.falcon.add_vulnerable_asgi_routes(app)
return testing.TestClient(app)
Expand Down
Loading