Skip to content

Commit

Permalink
fix inbound lxm check
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBuchanan314 committed Jan 22, 2025
1 parent 0d39403 commit ce168c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/millipds/auth_bearer.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ async def auth_middleware(request: web.Request, handler):
if revoked:
raise web.HTTPUnauthorized(text="revoked token")

request_lxm = request.path.rpartition("/")[2].partition("?")[0]
# note: request.path does not include the query string
request_lxm = request.path.rpartition("/")[2]
if request_lxm != payload.get("lxm"):
raise web.HTTPUnauthorized(text="invalid jwt: bad lxm")

Expand Down

0 comments on commit ce168c0

Please sign in to comment.