wok rev 14111
Up zerobin (0.18_alpha)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 24 18:40:38 2013 +0100 (2013-02-24) |
parents | 7ad0051245b2 |
children | 79418982a5a2 |
files | zerobin/receipt zerobin/stuff/zerobin.u |
line diff
1.1 --- a/zerobin/receipt Sun Feb 24 18:01:08 2013 +0000 1.2 +++ b/zerobin/receipt Sun Feb 24 18:40:38 2013 +0100 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="zerobin" 1.7 -VERSION="0.17_alpha" 1.8 +VERSION="0.18_alpha" 1.9 CATEGORY="network" 1.10 SHORT_DESC="Online pastebin where the server has zero knowledge of pasted data." 1.11 MAINTAINER="pascal.bellard@slitaz.org" 1.12 @@ -17,7 +17,7 @@ 1.13 { 1.14 cd $src 1.15 patch -p0 < $stuff/zerobin.u 1.16 - dos2unix *.txt *.php tpl/*.html lib/*.js lib/*.php lib/*.css 1.17 + find css js lib tpl -type f | xargs dos2unix *.* 1.18 } 1.19 1.20 # Rules to gen a SliTaz package suitable for Tazpkg.
2.1 --- a/zerobin/stuff/zerobin.u Sun Feb 24 18:01:08 2013 +0000 2.2 +++ b/zerobin/stuff/zerobin.u Sun Feb 24 18:40:38 2013 +0100 2.3 @@ -6,15 +6,15 @@ 2.4 2.5 +function remote_address() 2.6 +{ 2.7 -+ if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) 2.8 -+ return $_SERVER["HTTP_X_FORWARDED_FOR"]; 2.9 ++ // if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) 2.10 ++ // return $_SERVER["HTTP_X_FORWARDED_FOR"]; 2.11 + return $_SERVER["REMOTE_ADDR"]; 2.12 +} 2.13 + 2.14 // trafic_limiter : Make sure the IP address makes at most 1 request every 10 seconds. 2.15 // Will return false if IP address made a call less than 10 seconds ago. 2.16 function trafic_limiter_canPass($ip) 2.17 -@@ -137,7 +144,7 @@ 2.18 +@@ -144,7 +151,7 @@ 2.19 } 2.20 2.21 // Make sure last paste from the IP address was more than 10 seconds ago. 2.22 @@ -23,7 +23,7 @@ 2.23 { echo json_encode(array('status'=>1,'message'=>'Please wait 10 seconds between each post.')); exit; } 2.24 2.25 // Make sure content is not too big. 2.26 -@@ -192,7 +199,7 @@ 2.27 +@@ -216,7 +223,7 @@ 2.28 // (We assume that if the user did not enter a nickname, he/she wants 2.29 // to be anonymous and we will not generate the vizhash.) 2.30 $vz = new vizhash16x16(); 2.31 @@ -34,7 +34,7 @@ 2.32 } 2.33 --- js/zerobin.js 2.34 +++ js/zerobin.js 2.35 -@@ -308,7 +308,13 @@ 2.36 +@@ -326,7 +326,13 @@ 2.37 return; 2.38 } 2.39 showStatus('Sending paste...', spin=true);