wok-next diff zerobin/stuff/zerobin.u @ rev 18392

Add: WIP open-vm-tools kernel modules
author Nathan Neulinger <nneul@neulinger.org>
date Fri Sep 18 23:50:52 2015 +0000 (2015-09-18)
parents 30f393e65a4c
children 139df21c10dd
line diff
     1.1 --- a/zerobin/stuff/zerobin.u	Sun Feb 24 11:44:36 2013 +0100
     1.2 +++ b/zerobin/stuff/zerobin.u	Fri Sep 18 23:50:52 2015 +0000
     1.3 @@ -6,15 +6,15 @@
     1.4   
     1.5  +function remote_address()
     1.6  +{
     1.7 -+	if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
     1.8 -+		return $_SERVER["HTTP_X_FORWARDED_FOR"];
     1.9 ++	// if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
    1.10 ++	//	return $_SERVER["HTTP_X_FORWARDED_FOR"];
    1.11  +	return $_SERVER["REMOTE_ADDR"];
    1.12  +}
    1.13  +
    1.14   // trafic_limiter : Make sure the IP address makes at most 1 request every 10 seconds.
    1.15   // Will return false if IP address made a call less than 10 seconds ago.
    1.16   function trafic_limiter_canPass($ip)
    1.17 -@@ -137,7 +144,7 @@
    1.18 +@@ -144,7 +151,7 @@
    1.19       }
    1.20   
    1.21       // Make sure last paste from the IP address was more than 10 seconds ago.
    1.22 @@ -23,7 +23,7 @@
    1.23           { echo json_encode(array('status'=>1,'message'=>'Please wait 10 seconds between each post.')); exit; }
    1.24   
    1.25       // Make sure content is not too big.
    1.26 -@@ -192,7 +199,7 @@
    1.27 +@@ -216,7 +223,7 @@
    1.28               // (We assume that if the user did not enter a nickname, he/she wants
    1.29               // to be anonymous and we will not generate the vizhash.)
    1.30               $vz = new vizhash16x16();
    1.31 @@ -34,7 +34,7 @@
    1.32           }
    1.33  --- js/zerobin.js
    1.34  +++ js/zerobin.js
    1.35 -@@ -308,7 +308,13 @@
    1.36 +@@ -326,7 +326,13 @@
    1.37           return;
    1.38       }
    1.39       showStatus('Sending paste...', spin=true);