Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-07 17:47:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-07 17:47:00 +0300
commit08086ff522742c28a6b10e9b2ed71f0af6633e5b (patch)
tree5a4fde8b23140cb4edf04b24854b53f87085dd42 /app/services
parent8f3fbbf0d56091ad87158f61bf2a4e96a7f937e3 (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-ee
Diffstat (limited to 'app/services')
-rw-r--r--app/services/spam/akismet_service.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/services/spam/akismet_service.rb b/app/services/spam/akismet_service.rb
index 4e56972ccd5..e9843497dd7 100644
--- a/app/services/spam/akismet_service.rb
+++ b/app/services/spam/akismet_service.rb
@@ -20,14 +20,18 @@ module Spam
created_at: DateTime.current,
author: owner_name,
author_email: owner_email,
- referer: options[:referer]
+ referrer: options[:referer]
}
begin
is_spam, is_blatant = akismet_client.check(options[:ip_address], options[:user_agent], params)
is_spam || is_blatant
+ rescue ArgumentError => e
+ Gitlab::ErrorTracking.track_and_raise_for_dev_exception(e)
+ false
rescue StandardError => e
- Gitlab::AppLogger.error("Unable to connect to Akismet: #{e}, skipping check")
+ Gitlab::ErrorTracking.track_exception(e)
+ Gitlab::AppLogger.error("Error during Akismet spam check, flagging as not spam: #{e}")
false
end
end