Skip to content

Commit 19a0ba6

Browse files
dcramermattrobenolt
authored andcommitted
Mark AuditLogEntry fields as readonly
Additionally this resolves a superuser-only security concern around being able to craft and inject pickled data into the AuditLogEntry.data field. This won't prevent malicious data in there through other means, but this is the only place it's exposed for raw input (beyond shell). Thanks to Clément Berthaux from Synacktiv (www.synacktiv.com) for reporting this.
1 parent 40e3cd8 commit 19a0ba6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sentry/admin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ class AuditLogEntryAdmin(admin.ModelAdmin):
312312
list_filter = ('event', 'datetime')
313313
search_fields = ('actor__email', 'organization__name', 'organization__slug')
314314
raw_id_fields = ('organization', 'actor', 'target_user')
315+
readonly_fields = ('organization', 'actor', 'actor_key', 'target_object',
316+
'target_user', 'event', 'ip_address', 'data', 'datetime')
315317

316318
admin.site.register(AuditLogEntry, AuditLogEntryAdmin)
317319

0 commit comments

Comments
 (0)