Skip to content
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.6.4
- Fix `MAuthASGIMiddleware` when accessing `path` when `path` is not set yet.
This appears to only happen on startup.
- Replace the character `\n` on one-liner private keys.

# 1.6.3
- Revert change introduced in v1.6.2 now that Starlette has been updated to
always include `root_path` in `path`.
Expand Down
2 changes: 1 addition & 1 deletion mauth_client/lambda_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ def _get_private_key():
except ModuleNotFoundError:
pass

return private_key.replace(" ", "\n").replace("\nRSA\nPRIVATE\nKEY", " RSA PRIVATE KEY")
return private_key.replace("\\n", "\n").replace(" ", "\n").replace("\nRSA\nPRIVATE\nKEY", " RSA PRIVATE KEY")
6 changes: 4 additions & 2 deletions mauth_client/middlewares/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ def __init__(self, app: ASGI3Application, exempt: Optional[set] = None) -> None:
async def __call__(
self, scope: Scope, receive: ASGIReceiveCallable, send: ASGISendCallable
) -> None:
path = scope["path"]
if scope["type"] != "http":
return await self.app(scope, receive, send)

if scope["type"] != "http" or path in self.exempt:
path = scope["path"]
if path in self.exempt:
return await self.app(scope, receive, send)

query_string = scope["query_string"]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mauth-client"
version = "1.6.3"
version = "1.6.4"
description = "MAuth Client for Python"
repository = "https://github.com/mdsol/mauth-client-python"
authors = ["Medidata Solutions <[email protected]>"]
Expand Down