summaryrefslogtreecommitdiff
path: root/app/services/spam
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 13:16:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 13:16:36 +0000
commit311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch)
tree07e7870bca8aed6d61fdcc810731c50d2c40af47 /app/services/spam
parent27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff)
downloadgitlab-ce-311b0269b4eb9839fa63f80c8d7a58f32b8138a0.tar.gz
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'app/services/spam')
-rw-r--r--app/services/spam/spam_verdict_service.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/app/services/spam/spam_verdict_service.rb b/app/services/spam/spam_verdict_service.rb
index 8d995631db6..c8bdcf4310b 100644
--- a/app/services/spam/spam_verdict_service.rb
+++ b/app/services/spam/spam_verdict_service.rb
@@ -73,18 +73,12 @@ module Spam
begin
result, attribs, _error = spamcheck_client.issue_spam?(spam_issue: target, user: user, context: context)
- return [nil, attribs] unless result
-
# @TODO log if error is not nil https://gitlab.com/gitlab-org/gitlab/-/issues/329545
- return [result, attribs] if result == NOOP || attribs["monitorMode"] == "true"
+ return [nil, attribs] unless result
+
+ [result, attribs]
- # Duplicate logic with Akismet logic in #akismet_verdict
- if Gitlab::Recaptcha.enabled? && result != ALLOW
- [CONDITIONAL_ALLOW, attribs]
- else
- [result, attribs]
- end
rescue StandardError => e
Gitlab::ErrorTracking.log_exception(e)