# HG changeset patch # User Pascal Bellard # Date 1361727638 -3600 # Node ID 0baeb3ed8570905c2811e272860d5c97625db6b6 # Parent 7ad0051245b2a551e1f5fd87d99bce33c3a337ff Up zerobin (0.18_alpha) diff -r 7ad0051245b2 -r 0baeb3ed8570 zerobin/receipt --- a/zerobin/receipt Sun Feb 24 18:01:08 2013 +0000 +++ b/zerobin/receipt Sun Feb 24 18:40:38 2013 +0100 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="zerobin" -VERSION="0.17_alpha" +VERSION="0.18_alpha" CATEGORY="network" SHORT_DESC="Online pastebin where the server has zero knowledge of pasted data." MAINTAINER="pascal.bellard@slitaz.org" @@ -17,7 +17,7 @@ { cd $src patch -p0 < $stuff/zerobin.u - dos2unix *.txt *.php tpl/*.html lib/*.js lib/*.php lib/*.css + find css js lib tpl -type f | xargs dos2unix *.* } # Rules to gen a SliTaz package suitable for Tazpkg. diff -r 7ad0051245b2 -r 0baeb3ed8570 zerobin/stuff/zerobin.u --- a/zerobin/stuff/zerobin.u Sun Feb 24 18:01:08 2013 +0000 +++ b/zerobin/stuff/zerobin.u Sun Feb 24 18:40:38 2013 +0100 @@ -6,15 +6,15 @@ +function remote_address() +{ -+ if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) -+ return $_SERVER["HTTP_X_FORWARDED_FOR"]; ++ // if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) ++ // return $_SERVER["HTTP_X_FORWARDED_FOR"]; + return $_SERVER["REMOTE_ADDR"]; +} + // trafic_limiter : Make sure the IP address makes at most 1 request every 10 seconds. // Will return false if IP address made a call less than 10 seconds ago. function trafic_limiter_canPass($ip) -@@ -137,7 +144,7 @@ +@@ -144,7 +151,7 @@ } // Make sure last paste from the IP address was more than 10 seconds ago. @@ -23,7 +23,7 @@ { echo json_encode(array('status'=>1,'message'=>'Please wait 10 seconds between each post.')); exit; } // Make sure content is not too big. -@@ -192,7 +199,7 @@ +@@ -216,7 +223,7 @@ // (We assume that if the user did not enter a nickname, he/she wants // to be anonymous and we will not generate the vizhash.) $vz = new vizhash16x16(); @@ -34,7 +34,7 @@ } --- js/zerobin.js +++ js/zerobin.js -@@ -308,7 +308,13 @@ +@@ -326,7 +326,13 @@ return; } showStatus('Sending paste...', spin=true);