cvs: php-gtk-web /include cvs-auth.inc

[email protected] ("Steph Fox") Mon, 10 Jul 2006 23:04:00 -0000
Newsgroups php.gtk.webmaster
Message-ID <cvssfox1152572640@cvsserver>
sfox		Mon Jul 10 23:04:00 2006 UTC

  Modified files:              
    /php-gtk-web/include	cvs-auth.inc 
  Log:
  hm, it helped some - now let's make it possible to survive an attack :)
  
http://cvs.php.net/viewvc.cgi/php-gtk-web/include/cvs-auth.inc?r1=1.8&r2=1.9&diff_format=u
Index: php-gtk-web/include/cvs-auth.inc
diff -u php-gtk-web/include/cvs-auth.inc:1.8 php-gtk-web/include/cvs-auth.inc:1.9
--- php-gtk-web/include/cvs-auth.inc:1.8	Sun Jul  9 17:02:53 2006
+++ php-gtk-web/include/cvs-auth.inc	Mon Jul 10 23:04:00 2006
@@ -1,5 +1,5 @@
 <?php
-/* $Id: cvs-auth.inc,v 1.8 2006/07/09 17:02:53 sfox Exp $ */
+/* $Id: cvs-auth.inc,v 1.9 2006/07/10 23:04:00 sfox Exp $ */
 require_once('config.inc');
 
 function get_auth($name, $pass, $connect = null) {
@@ -62,7 +62,8 @@
 			}
 		}
 	}
-	header("Location: {$_SERVER['HTTP_REFERER']}");
+	$ref = substr($_SERVER['HTTP_REFERER'], 0, strpos($_SERVER['HTTP_REFERER'], '.php') + 4);
+	header("Location: $ref");
 }
 
 function get_user() {