Skip to content

Commit 2f32397

Browse files
authored
Fix bug causing 403 responses when plugin data is not set (#365)
1 parent 55608e4 commit 2f32397

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api/views/resources/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def put(self, app: App) -> ResponseReturnValue:
101101
# privilege escalation in the managed apps.
102102
if (
103103
app_changes.app_group_lifecycle_plugin != app.app_group_lifecycle_plugin
104-
or app_changes.plugin_data != app.plugin_data
104+
or (app_changes.plugin_data or {}) != app.plugin_data
105105
) and not AuthorizationHelpers.is_access_admin():
106106
abort(
107107
403,

api/views/resources/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def put(self, group: OktaGroup) -> ResponseReturnValue:
122122

123123
# Enforce stricter authorization for plugin configuration changes to prevent
124124
# privilege escalation in the managed apps.
125-
if group_changes.plugin_data != group.plugin_data and not (
125+
if (group_changes.plugin_data or {}) != group.plugin_data and not (
126126
AuthorizationHelpers.is_access_admin()
127127
or (type(group) is AppGroup and AuthorizationHelpers.is_app_owner_group_owner(app_group=group))
128128
):

0 commit comments

Comments
 (0)