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

Handle spaces in x-forwared-for/remove six (#1127) #1163

Merged

Conversation

monkut
Copy link
Collaborator

@monkut monkut commented Aug 10, 2022

  • Whitespace in X-Forwarded-For is optional and therefore should handle the case when there is no whitespace (contribution by naresh-uplight)
  • 🔥 remove six from zappa dependencies
  • 🔧 Fix url decoding for query string (contribution by choich)

six is still a sub-dependency of boto3, but no longer required directly by zappa.

Related Issue(s):
#879
#1127
#1164

Related PR:
#972 (integrated into this PR) contribution by (pauldes)

@monkut monkut marked this pull request as ready for review August 10, 2022 07:43
@coveralls
Copy link

coveralls commented Aug 10, 2022

Coverage Status

Coverage increased (+0.1%) to 73.81% when pulling e78cd9c on fix/issue-1127-handle-optional-space-in-xforwardedfor-header into c048ea2 on master.

@monkut monkut changed the title Handle spaces in x-forwared-for (#1127) Handle spaces in x-forwared-for/remove six (#1127) Aug 12, 2022
monkut added 3 commits August 12, 2022 19:16
✨ handle case where "requestContext" is not provided by the event.

> Systems calling the Lambda (other than API Gateway) may not provide the field requestContext in the event.

✅ add testcases
@monkut monkut requested review from thommor and hellno August 29, 2022 05:06
zappa/wsgi.py Outdated Show resolved Hide resolved
tests/utils.py Show resolved Hide resolved
zappa/wsgi.py Show resolved Hide resolved
tests/tests.py Outdated Show resolved Hide resolved
@monkut monkut merged commit d47a4da into master Oct 6, 2022
Ian288 pushed a commit to tackle-io/Zappa that referenced this pull request Jul 11, 2023
* ✨ Handle spaces in x-forwared-for (zappa#1127)

* 🔥 remove `six` (no longer needed as 2.x is no longer supported)

* ✅ add testcase for SUPPORTED_VERSION check to increase code coverage.

* 🎨 run black/isort

* 🔧 rename function for clarity

* 🔥 remove unnecessary import

* 🔧 change name of unused mock instance

* ✨ (zappa#879) Fix url decoding for query string

* 🔧 change docstring type multi-line comment to standard multiline comment
✨ handle case where "requestContext" is not provided by the event.

> Systems calling the Lambda (other than API Gateway) may not provide the field requestContext in the event.

✅ add testcases

* 🔥 remove duplicate comment

* 📝 add docstring to util function, `get_unsupported_sys_versioninfo()`

* 🔥 remove double-underscore
BarNehemia added a commit to Lightricks/Zappa that referenced this pull request Aug 10, 2023
…zappa-0.57.0

* commit '0b1eab14ca39c3a3bfb4e915347e07495171dcba': (27 commits)
  updating workflow actions to remove deprecation warnings (zappa#1243)
  📝 CHANGELOG.md update for 0.57.0 (zappa#1246)
  fixing compatibility with Django 4.2 (zappa#1237)
  Update Readme with patreon and donors (zappa#1234)
  adding support for Python 3.10 (zappa#1231)
  Nose to pytest (zappa#1239)
  lint: updating code style with `make black` (zappa#1238)
  Alternative way to check if running in Docker (zappa#1204)
  📝 CHANGELOG.md update for 0.56.0 release (zappa#1187)
  Improve `get_best_match_zone()` to match by most matched components instead of by length of domain (zappa#1193)
  Bypass python version runtime check when code run in docker (zappa#1180)
  Be able to pass in a batch window when using batch size (zappa#1118)
  Correction to README. (zappa#1177)
  (zappa#908) Update BINARY_SUPPORT to use Content-Encoding to identify if data is binary (zappa#1155)
  Remove special check for Django<1.7, fix for zappa#1158  (zappa#1159)
  Resolve (zappa#410) Logs are missing query strings (zappa#1165)
  Handle spaces in x-forwared-for/remove six (zappa#1127) (zappa#1163)
  add feature (zappa#704) Check if args/kwargs are JSON Serializable while running locally (zappa#1154)
  docs: Add documentation for s3 event object key_filters (zappa#1169)
  Add feature pyenv virtualenv detecting .python-version file (zappa#1153)
  ...

# Conflicts:
#	zappa/cli.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants