Merge pull request #1791 from ryanpetrello/censor-deleted-token

censor OAuth tokens from activity stream deletion records
This commit is contained in:
Ryan Petrello 2018-05-15 10:00:55 -04:00 committed by GitHub
commit 7481d671ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -494,6 +494,8 @@ def activity_stream_delete(sender, instance, **kwargs):
return
changes = model_to_dict(instance)
object1 = camelcase_to_underscore(instance.__class__.__name__)
if type(instance) == OAuth2AccessToken:
changes['token'] = TOKEN_CENSOR
activity_entry = ActivityStream(
operation='delete',
changes=json.dumps(changes),