[Fusionforge-commits] FusionForge branch 6.0 updated. v6.0.3-4-ge45727a

Sylvain Beucler beuc-inria at libremir.placard.fr.eu.org
Thu Oct 15 17:26:28 CEST 2015


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  e45727a86f7d251d304cb5104f625b04ae63642b (commit)
      from  1a6dc7231c562105613e42a9eb2127878b9e5bf0 (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=e45727a86f7d251d304cb5104f625b04ae63642b

commit e45727a86f7d251d304cb5104f625b04ae63642b
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Thu Oct 15 17:16:31 2015 +0200

    accounts: don't accept numeric-only user or group names

diff --git a/src/CHANGES b/src/CHANGES
index c2ba968..2b2e440 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -1,4 +1,6 @@
 FusionForge 6.0.4:
+* Accounts: do not accept digits-only user and group names, to avoid confusion with UID/GID in system commands (Inria)
+* Plugin SCM: improve user matching when computing stats (Inria)
 * Plugin scmhook: fix non-editable mailing list name in some configurations (Inria)
 
 FusionForge 6.0.3:
diff --git a/src/common/include/account.php b/src/common/include/account.php
index e4750ac..e26e565 100644
--- a/src/common/include/account.php
+++ b/src/common/include/account.php
@@ -76,6 +76,12 @@ function account_namevalid($name, $unix=false, $check_exists=true) {
 		return false;
 	}
 
+	// avoid ambiguity with UID/GID, especially in system commands (chown, chgrp, etc.)
+	if (!preg_match('/[a-z]/', $name)) {
+		$GLOBALS['register_error'] = _('Name contains only digits. It must contains at least 1 letter.');
+		return false;
+	}
+
 	// illegal names
 	$system_user = forge_get_config('system_user');
 	$system_user_ssh_akc = forge_get_config('system_user_ssh_akc');

-----------------------------------------------------------------------

Summary of changes:
 src/CHANGES                    | 2 ++
 src/common/include/account.php | 6 ++++++
 2 files changed, 8 insertions(+)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list