Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
673a8bb2
Commit
673a8bb2
authored
Jul 29, 2014
by
Thomas Müller
Browse files
only call exec() if allowed to
parent
2946a63f
Changes
1
Hide whitespace changes
Inline
Side-by-side
settings/admin.php
View file @
673a8bb2
...
...
@@ -101,9 +101,11 @@ $tmpl->printPage();
* @return null|string
*/
function
findBinaryPath
(
$program
)
{
exec
(
'command -v '
.
escapeshellarg
(
$program
)
.
' 2> /dev/null'
,
$output
,
$returnCode
);
if
(
$returnCode
===
0
&&
count
(
$output
)
>
0
)
{
return
escapeshellcmd
(
$output
[
0
]);
if
(
OC_Helper
::
is_function_enabled
(
'exec'
))
{
exec
(
'command -v '
.
escapeshellarg
(
$program
)
.
' 2> /dev/null'
,
$output
,
$returnCode
);
if
(
$returnCode
===
0
&&
count
(
$output
)
>
0
)
{
return
escapeshellcmd
(
$output
[
0
]);
}
}
return
null
;
}
Write
Preview
Supports
Markdown
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