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
b7ecf433
Commit
b7ecf433
authored
Mar 25, 2019
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cr remarks
parent
0b324d34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+3
-3
changelogs/unreleased/security-mass-assignment-on-project-update.yml
...unreleased/security-mass-assignment-on-project-update.yml
+1
-1
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+1
-1
No files found.
app/controllers/projects_controller.rb
View file @
b7ecf433
...
@@ -328,9 +328,9 @@ class ProjectsController < Projects::ApplicationController
...
@@ -328,9 +328,9 @@ class ProjectsController < Projects::ApplicationController
end
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: enable CodeReuse/ActiveRecord
def
project_params
(
attributes:
project_params_attributes
)
def
project_params
(
attributes:
[]
)
params
.
require
(
:project
)
params
.
require
(
:project
)
.
permit
(
attributes
)
.
permit
(
project_params_attributes
+
attributes
)
end
end
def
project_params_attributes
def
project_params_attributes
...
@@ -375,7 +375,7 @@ class ProjectsController < Projects::ApplicationController
...
@@ -375,7 +375,7 @@ class ProjectsController < Projects::ApplicationController
end
end
def
project_params_create_attributes
def
project_params_create_attributes
project_params_attributes
<<
:namespace_id
[
:namespace_id
]
end
end
def
custom_import_params
def
custom_import_params
...
...
changelogs/unreleased/security-mass-assignment-on-project-update.yml
View file @
b7ecf433
---
---
title
:
Disallow updating namespace
during updating
project
title
:
Disallow updating namespace
when updating a
project
merge_request
:
merge_request
:
author
:
author
:
type
:
security
type
:
security
spec/controllers/projects_controller_spec.rb
View file @
b7ecf433
...
@@ -383,7 +383,7 @@ describe ProjectsController do
...
@@ -383,7 +383,7 @@ describe ProjectsController do
id:
project
.
id
,
id:
project
.
id
,
project:
params
project:
params
}
}
end
.
not_to
change
{
project
.
namespace
}
end
.
not_to
change
{
project
.
reload
.
namespace
}
end
end
def
update_project
(
**
parameters
)
def
update_project
(
**
parameters
)
...
...
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