From 49b27f4bba7a9bdbf94e2217ab823a2cb2f7b7e3 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Fri, 6 Jan 2023 16:26:59 -0800 Subject: [PATCH 1/2] Specify correct Content-Type for /profile Fixes https://github.com/asfadmin/thin-egress-app/issues/474 --- lambda/app.py | 2 +- tests/test_app.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lambda/app.py b/lambda/app.py index ec317326..83825749 100644 --- a/lambda/app.py +++ b/lambda/app.py @@ -1061,7 +1061,7 @@ def s3credentials_readme(): @with_trace(context={}) def profile(): return Response(body='Profile not available.', - status_code=200, headers={}) + status_code=200, headers={'Content-Type': 'text/plain'}) @app.route('/pubkey', methods=['GET']) diff --git a/tests/test_app.py b/tests/test_app.py index f96656c9..b7ae9cc9 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -1513,6 +1513,7 @@ def test_profile(client): assert response.body == b"Profile not available." assert response.status_code == 200 + assert response.headers["Content-Type"] == "text/plain" @mock.patch(f"{MODULE}.retrieve_secret", autospec=True) From ee602bcc89c38bb09ff547005f95a75f2bbfe2a7 Mon Sep 17 00:00:00 2001 From: Rohan Weeden Date: Wed, 8 Feb 2023 11:11:26 -0500 Subject: [PATCH 2/2] Update dependencies --- requirements/requirements-dev.txt | 32 ++++++++++++++---------------- requirements/requirements-docs.txt | 20 +++++++++---------- requirements/requirements-make.txt | 10 +++++----- requirements/requirements-test.txt | 26 +++++++++++------------- requirements/requirements.txt | 14 ++++++------- 5 files changed, 48 insertions(+), 54 deletions(-) diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt index bec037b6..a375e631 100644 --- a/requirements/requirements-dev.txt +++ b/requirements/requirements-dev.txt @@ -8,49 +8,47 @@ attrs==21.4.0 # via # -c requirements/requirements.txt # pytest -boto3==1.25.3 +boto3==1.26.66 # via -r requirements/requirements-dev.in -botocore==1.28.3 +botocore==1.29.66 # via # -c requirements/requirements.txt # boto3 # s3transfer -build==0.9.0 +build==0.10.0 # via pip-tools click==8.1.3 # via # -c requirements/requirements.txt # pip-tools -coverage[toml]==6.5.0 +coverage[toml]==7.1.0 # via pytest-cov deprecated==1.2.13 # via opentelemetry-api -exceptiongroup==1.0.0 +exceptiongroup==1.1.0 # via pytest -iniconfig==1.1.1 +iniconfig==2.0.0 # via pytest jmespath==1.0.1 # via # -c requirements/requirements.txt # boto3 # botocore -opentelemetry-api==1.13.0 +opentelemetry-api==1.15.0 # via opentelemetry-instrumentation -opentelemetry-instrumentation==0.34b0 +opentelemetry-instrumentation==0.36b0 # via -r requirements/requirements-dev.in -packaging==21.3 +packaging==23.0 # via # build # pytest -pep517==0.13.0 - # via build -pip-tools==6.9.0 +pip-tools==6.12.2 # via -r requirements/requirements-dev.in pluggy==1.0.0 # via pytest -pyparsing==3.0.9 - # via packaging -pytest==7.2.0 +pyproject-hooks==1.0.0 + # via build +pytest==7.2.1 # via # -r requirements/requirements-dev.in # pytest-cov @@ -74,9 +72,9 @@ tomli==2.0.1 # via # build # coverage - # pep517 + # pyproject-hooks # pytest -urllib3==1.26.12 +urllib3==1.26.14 # via # -c requirements/requirements.txt # botocore diff --git a/requirements/requirements-docs.txt b/requirements/requirements-docs.txt index bc63efee..e9ec06a4 100644 --- a/requirements/requirements-docs.txt +++ b/requirements/requirements-docs.txt @@ -8,7 +8,7 @@ click==8.1.3 # via mkdocs ghp-import==2.1.0 # via mkdocs -importlib-metadata==4.11.3 +importlib-metadata==6.0.0 # via # markdown # mkdocs @@ -19,11 +19,11 @@ markdown==3.3.7 # mkdocs # mkdocs-material # pymdown-extensions -markupsafe==2.1.1 +markupsafe==2.1.2 # via jinja2 mergedeep==1.3.4 # via mkdocs -mkdocs==1.3.0 +mkdocs==1.4.2 # via # -r requirements/requirements-docs.in # mkdocs-asf-theme @@ -32,16 +32,14 @@ mkdocs-asf-theme==0.2.4 # via -r requirements/requirements-docs.in mkdocs-material==6.2.8 # via mkdocs-asf-theme -mkdocs-material-extensions==1.0.3 +mkdocs-material-extensions==1.1.1 # via mkdocs-material -packaging==21.3 +packaging==23.0 # via mkdocs -pygments==2.12.0 +pygments==2.14.0 # via mkdocs-material -pymdown-extensions==9.4 +pymdown-extensions==9.9.2 # via mkdocs-material -pyparsing==3.0.9 - # via packaging python-dateutil==2.8.2 # via ghp-import pyyaml==6.0 @@ -52,7 +50,7 @@ pyyaml-env-tag==0.1 # via mkdocs six==1.16.0 # via python-dateutil -watchdog==2.1.7 +watchdog==2.2.1 # via mkdocs -zipp==3.8.0 +zipp==3.12.1 # via importlib-metadata diff --git a/requirements/requirements-make.txt b/requirements/requirements-make.txt index 6e757c07..958d11bc 100644 --- a/requirements/requirements-make.txt +++ b/requirements/requirements-make.txt @@ -4,7 +4,7 @@ # # pip-compile requirements/requirements-make.in # -importlib-metadata==5.0.0 +importlib-metadata==6.0.0 # via markdown jinja2==3.1.2 # via -r requirements/requirements-make.in @@ -12,11 +12,11 @@ markdown==3.4.1 # via # -r requirements/requirements-make.in # pymdown-extensions -markupsafe==2.1.1 +markupsafe==2.1.2 # via jinja2 -pygments==2.13.0 +pygments==2.14.0 # via -r requirements/requirements-make.in -pymdown-extensions==9.7 +pymdown-extensions==9.9.2 # via -r requirements/requirements-make.in -zipp==3.10.0 +zipp==3.12.1 # via importlib-metadata diff --git a/requirements/requirements-test.txt b/requirements/requirements-test.txt index 64a5ccea..448feb85 100644 --- a/requirements/requirements-test.txt +++ b/requirements/requirements-test.txt @@ -4,41 +4,39 @@ # # pip-compile requirements/requirements-test.in # -attrs==22.1.0 +attrs==22.2.0 # via pytest -boto3==1.24.94 +boto3==1.26.66 # via -r requirements/requirements-test.in -botocore==1.27.94 +botocore==1.29.66 # via # boto3 # s3transfer -certifi==2022.9.24 +certifi==2022.12.7 # via requests -charset-normalizer==2.1.1 +charset-normalizer==3.0.1 # via requests +exceptiongroup==1.1.0 + # via pytest idna==3.4 # via requests -iniconfig==1.1.1 +iniconfig==2.0.0 # via pytest jmespath==1.0.1 # via # boto3 # botocore -packaging==21.3 +packaging==23.0 # via pytest pluggy==1.0.0 # via pytest -py==1.11.0 - # via pytest -pyparsing==3.0.9 - # via packaging -pytest==7.1.3 +pytest==7.2.1 # via -r requirements/requirements-test.in python-dateutil==2.8.2 # via botocore pyyaml==6.0 # via -r requirements/requirements-test.in -requests==2.28.1 +requests==2.28.2 # via -r requirements/requirements-test.in s3transfer==0.6.0 # via boto3 @@ -46,7 +44,7 @@ six==1.16.0 # via python-dateutil tomli==2.0.1 # via pytest -urllib3==1.26.12 +urllib3==1.26.14 # via # botocore # requests diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 3709534c..2345cb0a 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -6,9 +6,9 @@ # attrs==21.4.0 # via chalice -blessed==1.19.1 +blessed==1.20.0 # via inquirer -botocore==1.28.3 +botocore==1.29.66 # via chalice cachetools==5.0.0 # via @@ -22,11 +22,11 @@ chalice==1.27.3 # via -r requirements/requirements.in click==8.1.3 # via chalice -cryptography==38.0.1 +cryptography==39.0.1 # via pyjwt flatdict==4.0.1 # via -r requirements/requirements.in -inquirer==2.10.0 +inquirer==2.10.1 # via chalice jinja2==3.1.2 # via rain-api-core @@ -34,7 +34,7 @@ jmespath==1.0.1 # via # botocore # chalice -markupsafe==2.1.1 +markupsafe==2.1.2 # via jinja2 netaddr==0.8.0 # via @@ -63,11 +63,11 @@ six==1.16.0 # python-dateutil typing-extensions==4.4.0 # via chalice -urllib3==1.26.12 +urllib3==1.26.14 # via # botocore # cfnresponse -wcwidth==0.2.5 +wcwidth==0.2.6 # via blessed wheel==0.38.4 # via chalice