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
a835b0ce
Commit
a835b0ce
authored
Oct 02, 2014
by
Sytse Sijbrandij
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'be_pragmatic_about_shelling_out' into 'master'
Be pragmatic about shelling out See merge request !1149
parents
4e96c84e
97c5d380
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
shell_commands.md
doc/development/shell_commands.md
+6
-0
No files found.
doc/development/shell_commands.md
View file @
a835b0ce
...
...
@@ -22,6 +22,12 @@ FileUtils.mkdir_p "tmp/special/directory"
contents
=
`cat
#{
filename
}
`
# Correct
contents
=
File
.
read
(
filename
)
# Sometimes a shell command is just the best solution. The example below has no
# user input, and is hard to implement correctly in Ruby: delete all files and
# directories older than 120 minutes under /some/path, but not /some/path
# itself.
Gitlab
::
Popen
.
popen
(
%W(find /some/path -not -path /some/path -mmin +120 -delete)
)
```
This coding style could have prevented CVE-2013-4490.
...
...
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