Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
bc38c7ed
Commit
bc38c7ed
authored
May 15, 2013
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Sandbox] Reading from paths that contain executables should be safe.
parent
48ead16b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
sandbox-pod
bin/sandbox-pod
+5
-1
No files found.
bin/sandbox-pod
View file @
bc38c7ed
...
@@ -37,6 +37,7 @@ ruby_prefix = RbConfig::CONFIG['prefix']
...
@@ -37,6 +37,7 @@ ruby_prefix = RbConfig::CONFIG['prefix']
prefixes
=
[
'/bin'
,
'/usr/bin'
]
prefixes
=
[
'/bin'
,
'/usr/bin'
]
prefixes
<<
`brew --prefix`
.
strip
unless
`which brew`
.
strip
.
empty?
prefixes
<<
`brew --prefix`
.
strip
unless
`which brew`
.
strip
.
empty?
# TODO add MacPorts. More?
developer_prefix
=
`xcode-select --print-path`
.
strip
developer_prefix
=
`xcode-select --print-path`
.
strip
xcode_app_path
=
File
.
expand_path
(
'../..'
,
developer_prefix
)
xcode_app_path
=
File
.
expand_path
(
'../..'
,
developer_prefix
)
...
@@ -47,7 +48,7 @@ profile = ERB.new(DATA.read, 0, '>').result(TOPLEVEL_BINDING)
...
@@ -47,7 +48,7 @@ profile = ERB.new(DATA.read, 0, '>').result(TOPLEVEL_BINDING)
puts
profile
puts
profile
command
=
[
'/usr/bin/sandbox-exec'
,
'-p'
,
profile
,
pod_bin
,
*
ARGV
]
command
=
[
'/usr/bin/sandbox-exec'
,
'-p'
,
profile
,
pod_bin
,
*
ARGV
]
puts
command
#
puts command
exec
*
command
exec
*
command
...
@@ -98,6 +99,9 @@ __END__
...
@@ -98,6 +99,9 @@ __END__
#"^<%= pod_prefix %>"
#"^<%= pod_prefix %>"
#"^<%= xcode_app_path %>"
#"^<%= xcode_app_path %>"
#"^<%= Pod::Config.instance.repos_dir %>"
#"^<%= Pod::Config.instance.repos_dir %>"
<% prefixes.each do |prefix| %>
#"^<%= prefix %>/*"
<% 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