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, master has been updated
       via  68d4f3f853421aed7220aa8a1b14048160f13321 (commit)
      from  a465bd421b7d5baa7c0f93ee9fff0a21b1a50d21 (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=68d4f3f853421aed7220aa8a1b14048160f13321

commit 68d4f3f853421aed7220aa8a1b14048160f13321
Author: Franck Villaume <[email protected]>
Date:   Sun Dec 1 17:37:45 2019 +0100

    fix PHP warning in form_generate_key function

diff --git a/src/common/include/forms.php b/src/common/include/forms.php
index 7da4c17..7a66fd8 100644
--- a/src/common/include/forms.php
+++ b/src/common/include/forms.php
@@ -4,6 +4,7 @@
  *
  * Copyright 2005, GForge, LLC
  * Copyright 2009, Roland Mas
+ * Copyright 2019, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge. FusionForge is free software;
  * you can redistribute it and/or modify it under the terms of the
@@ -32,13 +33,13 @@ function form_generate_key() {
        db_begin();
        // there's about 99.999999999% probability this loop will run only once 
:)
        while(!$is_new) {
-               $key = md5(microtime() + util_randbytes() + 
$_SERVER["REMOTE_ADDR"]);
-               $res = db_query_params ('SELECT * FROM form_keys WHERE key=$1', 
array ($key));
+               $key = 
md5(microtime().util_randbytes().$_SERVER['REMOTE_ADDR']);
+               $res = db_query_params('SELECT * FROM form_keys WHERE key=$1', 
array ($key));
                if (!db_numrows($res)) {
-                       $is_new=true;
+                       $is_new = true;
                }
        }
-       $res = db_query_params('INSERT INTO form_keys 
(key,is_used,creation_date) VALUES ($1, 0, $2)', array ($key,time()));
+       $res = db_query_params('INSERT INTO form_keys (key, is_used, 
creation_date) VALUES ($1, 0, $2)', array($key, time()));
        if (!$res) {
                db_rollback();
                return false;

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

Summary of changes:
 src/common/include/forms.php | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to