From a0fcc8ff20fe57bf442402ba227954ffb33a2175 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 15 Oct 2015 18:58:09 -0400 Subject: Bug 1196626 - log all authenticated requests --- userprefs.cgi | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'userprefs.cgi') diff --git a/userprefs.cgi b/userprefs.cgi index 6c6a246ff..bd1bb8ab7 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -853,6 +853,12 @@ sub SaveApiKey { revoked => $revoked, }); $api_key->update(); + if ($revoked) { + Bugzilla->log_user_request(undef, undef, 'api-key-revoke') + } + else { + Bugzilla->log_user_request(undef, undef, 'api-key-unrevoke') + } } } } @@ -912,6 +918,7 @@ sub MfaApiKey { revoked => 0, }); $api_key->update(); + Bugzilla->log_user_request(undef, undef, 'api-key-unrevoke'); $dbh->bz_commit_transaction; } } @@ -926,6 +933,8 @@ sub _create_api_key { description => $description, }); + Bugzilla->log_user_request(undef, undef, 'api-key-create'); + # As a security precaution, we always sent out an e-mail when # an API key is created my $template = Bugzilla->template_inner($user->setting('lang')); -- cgit v1.2.3-24-g4f1b