public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Liam McLoughlin" <hexxeh@hexxeh.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoaster:webui commit in: web/
Date: Wed, 27 Jul 2011 20:11:18 +0000 (UTC)	[thread overview]
Message-ID: <aebdf3ef47a283793013a9da18c25c73458f400a.hexxeh@gentoo> (raw)

commit:     aebdf3ef47a283793013a9da18c25c73458f400a
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Wed Jul 27 20:10:52 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Wed Jul 27 20:10:52 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=aebdf3ef

Add missing IP address parameter when creating job entry

---
 web/process.php |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/web/process.php b/web/process.php
index 9ba055b..1daaa86 100644
--- a/web/process.php
+++ b/web/process.php
@@ -5,12 +5,12 @@
 
     require_once "config.php";
 
+    $ipaddress = filter_input(INPUT_SERVER, "REMOTE_ADDR",
+                              FILTER_VALIDATE_IP);
+
     if (RECAPTCHA_ENABLED) {
         require_once "recaptcha.php";
-    
-        $remoteAddress = filter_input(INPUT_SERVER,
-                                      "REMOTE_ADDR",
-                                      FILTER_VALIDATE_IP);
+
         $challenge = filter_input(INPUT_POST,
                                   "recaptcha_challenge_field",
                                   FILTER_UNSAFE_RAW);
@@ -19,7 +19,7 @@
                                  FILTER_UNSAFE_RAW);
         
         $resp = recaptcha_check_answer(RECAPTCHA_PRIVATE_KEY,
-                                       $remoteAddress,
+                                       $ipaddress,
                                        $challenge,
                                        $response);
                                     
@@ -76,8 +76,8 @@ OUTPUT_FORMAT=$outputFormat";
        die("Could not connect to database ".mysqli_connect_error());
     }
 
-    $stmt = $db->prepare("INSERT INTO builds (id, handle) VALUES(?, ?)");
-    $stmt->bind_param("ss", $buildID, $handle);
+    $stmt = $db->prepare("INSERT INTO builds (id, handle, ipaddress) VALUES(?, ?, ?)");
+    $stmt->bind_param("sss", $buildID, $handle, $ipaddress);
     $stmt->execute();
     $stmt->close();
     $db->close();



WARNING: multiple messages have this Message-ID (diff)
From: "Liam McLoughlin" <hexxeh@hexxeh.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoaster:master commit in: web/
Date: Fri, 12 Aug 2011 23:17:56 +0000 (UTC)	[thread overview]
Message-ID: <aebdf3ef47a283793013a9da18c25c73458f400a.hexxeh@gentoo> (raw)
Message-ID: <20110812231756.cwyGI0-G7hN7g_qzS-1YcsBw4Iw4rsZ3vZk-v3F_upg@z> (raw)

commit:     aebdf3ef47a283793013a9da18c25c73458f400a
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Wed Jul 27 20:10:52 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Wed Jul 27 20:10:52 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=aebdf3ef

Add missing IP address parameter when creating job entry

---
 web/process.php |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/web/process.php b/web/process.php
index 9ba055b..1daaa86 100644
--- a/web/process.php
+++ b/web/process.php
@@ -5,12 +5,12 @@
 
     require_once "config.php";
 
+    $ipaddress = filter_input(INPUT_SERVER, "REMOTE_ADDR",
+                              FILTER_VALIDATE_IP);
+
     if (RECAPTCHA_ENABLED) {
         require_once "recaptcha.php";
-    
-        $remoteAddress = filter_input(INPUT_SERVER,
-                                      "REMOTE_ADDR",
-                                      FILTER_VALIDATE_IP);
+
         $challenge = filter_input(INPUT_POST,
                                   "recaptcha_challenge_field",
                                   FILTER_UNSAFE_RAW);
@@ -19,7 +19,7 @@
                                  FILTER_UNSAFE_RAW);
         
         $resp = recaptcha_check_answer(RECAPTCHA_PRIVATE_KEY,
-                                       $remoteAddress,
+                                       $ipaddress,
                                        $challenge,
                                        $response);
                                     
@@ -76,8 +76,8 @@ OUTPUT_FORMAT=$outputFormat";
        die("Could not connect to database ".mysqli_connect_error());
     }
 
-    $stmt = $db->prepare("INSERT INTO builds (id, handle) VALUES(?, ?)");
-    $stmt->bind_param("ss", $buildID, $handle);
+    $stmt = $db->prepare("INSERT INTO builds (id, handle, ipaddress) VALUES(?, ?, ?)");
+    $stmt->bind_param("sss", $buildID, $handle, $ipaddress);
     $stmt->execute();
     $stmt->close();
     $db->close();



             reply	other threads:[~2011-07-27 20:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27 20:11 Liam McLoughlin [this message]
2011-08-12 23:17 ` [gentoo-commits] proj/gentoaster:master commit in: web/ Liam McLoughlin
  -- strict thread matches above, loose matches on Subject: below --
2011-08-12 23:17 Liam McLoughlin
2011-08-02 17:22 ` [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-28  1:08 ` [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-27 22:13 ` [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-27 20:04 ` [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-24  2:43 ` [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-06  0:14 Liam McLoughlin
2011-08-04 21:04 Liam McLoughlin
2011-08-02 17:31 Liam McLoughlin
2011-07-28  1:12 Liam McLoughlin
2011-07-28  1:02 Liam McLoughlin
2011-07-28  0:56 Liam McLoughlin
2011-07-27 22:11 Liam McLoughlin
2011-07-27 22:11 Liam McLoughlin
2011-07-27 22:04 Liam McLoughlin
2011-07-27 22:02 Liam McLoughlin
2011-07-27 20:25 Liam McLoughlin
2011-07-15 19:59 Liam McLoughlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aebdf3ef47a283793013a9da18c25c73458f400a.hexxeh@gentoo \
    --to=hexxeh@hexxeh.net \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox