Skip to content

Commit 1f6090d

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 174dc31 commit 1f6090d

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
@@ -330,6 +330,8 @@ class AuditLogEntryAdmin(admin.ModelAdmin):
330330
list_filter = ('event', 'datetime')
331331
search_fields = ('actor__email', 'organization__name', 'organization__slug')
332332
raw_id_fields = ('organization', 'actor', 'target_user')
333+
readonly_fields = ('organization', 'actor', 'actor_key', 'target_object',
334+
'target_user', 'event', 'ip_address', 'data', 'datetime')
333335

334336
admin.site.register(AuditLogEntry, AuditLogEntryAdmin)
335337

0 commit comments

Comments
 (0)