BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
212967ae
Unverified
Commit
212967ae
authored
Dec 20, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reject blank environment vcariables in Gitlab::Git::RevList
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
c1dbae90
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
rev_list.rb
lib/gitlab/git/rev_list.rb
+2
-2
rev_list_spec.rb
spec/lib/gitlab/git/rev_list_spec.rb
+7
-0
No files found.
lib/gitlab/git/rev_list.rb
View file @
212967ae
...
...
@@ -22,7 +22,7 @@ module Gitlab
def
valid?
environment_variables
.
all?
do
|
(
name
,
value
)
|
value
.
start_with?
(
project
.
repository
.
path_to_repo
)
value
.
to_s
.
start_with?
(
project
.
repository
.
path_to_repo
)
end
end
...
...
@@ -35,7 +35,7 @@ module Gitlab
end
def
environment_variables
@environment_variables
||=
env
.
slice
(
*
ALLOWED_VARIABLES
)
@environment_variables
||=
env
.
slice
(
*
ALLOWED_VARIABLES
)
.
compact
end
end
end
...
...
spec/lib/gitlab/git/rev_list_spec.rb
View file @
212967ae
...
...
@@ -26,6 +26,13 @@ describe Gitlab::Git::RevList, lib: true do
expect
(
rev_list
).
not_to
be_valid
end
it
"ignores nil values"
do
env
=
{
var
=>
nil
}
rev_list
=
described_class
.
new
(
'oldrev'
,
'newrev'
,
project:
project
,
env:
env
)
expect
(
rev_list
).
to
be_valid
end
end
end
end
...
...
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