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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
doc/development/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