Skip to content

Commit

Permalink
🩹 Fix wallet access being restricted when group_id is null (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
ff137 authored Apr 9, 2024
1 parent ca0ddbe commit fff2571
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/util/tenants.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def assert_valid_group(
Raises:
HTTPException: If the wallet does not belong to the group_id.
"""
if group_id and wallet.settings.get("wallet.group_id") != group_id:
wallet_group_id = wallet.settings.get("wallet.group_id")
if group_id and wallet_group_id and wallet_group_id != group_id:
logger.info("Bad request: wallet_id does not belong to group_id.")

# 404 instead of 403, obscure existence of wallet_id outside group
Expand Down

0 comments on commit fff2571

Please sign in to comment.