This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, 6.0 has been updated
via 92f420968b43c7611930f10f29a93f0cbd1508b4 (commit)
via afcfe76f5195af4566ff3a8280714383fcdb5a67 (commit)
from d4d50d53bb607ef153a54b557902a8085af4656c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 92f420968b43c7611930f10f29a93f0cbd1508b4
Merge: d4d50d5 afcfe76
Author: Roland Mas <[email protected]>
Date: Thu May 28 11:14:09 2015 +0200
Merge branch 'Branch_5_3' into 6.0
-----------------------------------------------------------------------
Summary of changes:
src/plugins/scmgit/common/GitPlugin.class.php | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/plugins/scmgit/common/GitPlugin.class.php
b/src/plugins/scmgit/common/GitPlugin.class.php
index c34f6f4..e5cece1 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -503,6 +503,10 @@ control over it to the project's administrator.");
$repo_name = db_result($result,$i,'repo_name');
$description = db_result($result,$i,'description');
$clone_url = db_result($result,$i,'clone_url');
+ // Clone URLs need to be validated to prevent a potential
arbitrary command execution
+ if (!preg_match('|^[-a-zA-Z0-9:./_]+$|', $clone_url)) {
+ $clone_url = '';
+ }
$repodir = $root . '/' . $repo_name . '.git';
if (!is_file("$repodir/HEAD") &&
!is_dir("$repodir/objects") && !is_dir("$repodir/refs")) {
if ($clone_url != '') {
@@ -1034,8 +1038,9 @@ control over it to the project's administrator.");
if ($url == '') {
// Start from empty
$clone = $url;
- } elseif (preg_match('|^git://|', $url) ||
preg_match('|^https?://|', $url)) {
- // External URLs: OK
+ } elseif ((preg_match('|^git://|', $url) ||
preg_match('|^https?://|', $url))
+ && preg_match('|^[-a-zA-Z0-9:./_]+$|', $url)) {
+ // External URLs: OK, but they need to be
validated to prevent a potential arbitrary command execution
$clone = $url;
} elseif ($url == $project->getUnixName()) {
$clone = $url;
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits