Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d7c0763e
Commit
d7c0763e
authored
Oct 01, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
06d34544
d8af8dd1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
8 deletions
+40
-8
GITALY_SERVER_VERSION
GITALY_SERVER_VERSION
+1
-1
db/structure.sql
db/structure.sql
+0
-6
ee/app/models/ee/issue.rb
ee/app/models/ee/issue.rb
+1
-1
ee/changelogs/unreleased/220297-attempts-to-edit-issue-are-blocked-by-never-ending-captchas.yml
...ts-to-edit-issue-are-blocked-by-never-ending-captchas.yml
+6
-0
ee/spec/models/issue_spec.rb
ee/spec/models/issue_spec.rb
+32
-0
No files found.
GITALY_SERVER_VERSION
View file @
d7c0763e
61dcdf969231954c06f16a6222a7540460f4b4f
0
0ae7a0079068ca8ad3a074c87e1b39037bdaed8
0
db/structure.sql
View file @
d7c0763e
...
...
@@ -10700,7 +10700,6 @@ ALTER SEQUENCE cluster_projects_id_seq OWNED BY cluster_projects.id;
CREATE
TABLE
cluster_providers_aws
(
id
bigint
NOT
NULL
,
cluster_id
bigint
NOT
NULL
,
created_by_user_id
integer
,
num_nodes
integer
NOT
NULL
,
status
integer
NOT
NULL
,
created_at
timestamp
with
time
zone
NOT
NULL
,
...
...
@@ -19881,8 +19880,6 @@ CREATE UNIQUE INDEX index_cluster_providers_aws_on_cluster_id ON cluster_provide
CREATE
INDEX
index_cluster_providers_aws_on_cluster_id_and_status
ON
cluster_providers_aws
USING
btree
(
cluster_id
,
status
);
CREATE
INDEX
index_cluster_providers_aws_on_created_by_user_id
ON
cluster_providers_aws
USING
btree
(
created_by_user_id
);
CREATE
INDEX
index_cluster_providers_gcp_on_cloud_run
ON
cluster_providers_gcp
USING
btree
(
cloud_run
);
CREATE
UNIQUE
INDEX
index_cluster_providers_gcp_on_cluster_id
ON
cluster_providers_gcp
USING
btree
(
cluster_id
);
...
...
@@ -23705,9 +23702,6 @@ ALTER TABLE ONLY alert_management_alert_user_mentions
ALTER
TABLE
ONLY
snippet_statistics
ADD
CONSTRAINT
fk_rails_ebc283ccf1
FOREIGN
KEY
(
snippet_id
)
REFERENCES
snippets
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ONLY
cluster_providers_aws
ADD
CONSTRAINT
fk_rails_ed1fdfaeb2
FOREIGN
KEY
(
created_by_user_id
)
REFERENCES
users
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ONLY
project_security_settings
ADD
CONSTRAINT
fk_rails_ed4abe1338
FOREIGN
KEY
(
project_id
)
REFERENCES
projects
(
id
)
ON
DELETE
CASCADE
;
...
...
ee/app/models/ee/issue.rb
View file @
d7c0763e
...
...
@@ -70,7 +70,7 @@ module EE
# override
def
check_for_spam?
author
.
bot?
||
super
author
.
bot?
&&
(
title_changed?
||
description_changed?
||
confidential_changed?
)
||
super
end
# override
...
...
ee/changelogs/unreleased/220297-attempts-to-edit-issue-are-blocked-by-never-ending-captchas.yml
0 → 100644
View file @
d7c0763e
---
title
:
Limit spam checks to title, description, or confidentiality changes on bot-created
issues
merge_request
:
43463
author
:
type
:
fixed
ee/spec/models/issue_spec.rb
View file @
d7c0763e
...
...
@@ -346,6 +346,38 @@ RSpec.describe Issue do
end
end
describe
'#check_for_spam?'
do
using
RSpec
::
Parameterized
::
TableSyntax
let_it_be
(
:reusable_project
)
{
create
(
:project
)
}
let_it_be
(
:author
)
{
::
User
.
support_bot
}
where
(
:visibility_level
,
:confidential
,
:new_attributes
,
:check_for_spam?
)
do
Gitlab
::
VisibilityLevel
::
PUBLIC
|
false
|
{
description:
'woo'
}
|
true
Gitlab
::
VisibilityLevel
::
PUBLIC
|
false
|
{
title:
'woo'
}
|
true
Gitlab
::
VisibilityLevel
::
PUBLIC
|
true
|
{
confidential:
false
}
|
true
Gitlab
::
VisibilityLevel
::
PUBLIC
|
true
|
{
description:
'woo'
}
|
true
Gitlab
::
VisibilityLevel
::
PUBLIC
|
false
|
{
title:
'woo'
,
confidential:
true
}
|
true
Gitlab
::
VisibilityLevel
::
INTERNAL
|
false
|
{
description:
'woo'
}
|
true
Gitlab
::
VisibilityLevel
::
PRIVATE
|
true
|
{
description:
'woo'
}
|
true
Gitlab
::
VisibilityLevel
::
PUBLIC
|
false
|
{
description:
'original description'
}
|
false
Gitlab
::
VisibilityLevel
::
PRIVATE
|
true
|
{
weight:
3
}
|
false
end
with_them
do
context
'when author is a bot'
do
it
'only checks for spam when description, title, or confidential status is updated'
do
project
=
reusable_project
project
.
update
(
visibility_level:
visibility_level
)
issue
=
create
(
:issue
,
project:
project
,
confidential:
confidential
,
description:
'original description'
,
author:
author
)
issue
.
assign_attributes
(
new_attributes
)
expect
(
issue
.
check_for_spam?
).
to
eq
(
check_for_spam?
)
end
end
end
end
describe
'#weight'
do
where
(
:license_value
,
:database_value
,
:expected
)
do
true
|
5
|
5
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment