Skip to content

Commit

Permalink
Merge pull request #660 from open-craft/agrendalath/se-6196-privilege…
Browse files Browse the repository at this point in the history
…-escalation-backport

fix: prevent setting user attributes from JWT in Studio
  • Loading branch information
0x29a authored May 20, 2024
2 parents 602a3dd + 47e4bb8 commit cc6e48d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,6 @@

############################ OAUTH2 Provider ###################################


# 5 minute expiration time for JWT id tokens issued for external API requests.
OAUTH_ID_TOKEN_EXPIRATION = 5 * 60

Expand All @@ -2252,6 +2251,12 @@
# Affiliate cookie tracking
AFFILIATE_COOKIE_NAME = 'dev_affiliate_id'

EDX_DRF_EXTENSIONS = {
# Set this value to an empty dict in order to prevent automatically updating
# user data from values in (possibly stale) JWTs.
'JWT_PAYLOAD_USER_ATTRIBUTE_MAPPING': {},
}

############## Settings for Studio Context Sensitive Help ##############

HELP_TOKENS_INI_FILE = REPO_ROOT / "cms" / "envs" / "help_tokens.ini"
Expand Down

0 comments on commit cc6e48d

Please sign in to comment.