|
From: Jon O. <jon...@us...> - 2006-06-17 20:45:25
|
Update of /cvsroot/mxbb/core/modules/mx_mod_rewrite/contrib In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4108/modules/mx_mod_rewrite/contrib Modified Files: rewrite_custom_defs.php Log Message: security Index: rewrite_custom_defs.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_mod_rewrite/contrib/rewrite_custom_defs.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rewrite_custom_defs.php 5 Apr 2006 20:58:13 -0000 1.2 --- rewrite_custom_defs.php 17 Jun 2006 20:45:22 -0000 1.3 *************** *** 8,12 **** * */ ! // // Module functions class --- 8,17 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! // // Module functions class *************** *** 17,21 **** /* Examples given below will define rules for the following site urls: ! http://domain/home http://domain/forum --- 22,26 ---- /* Examples given below will define rules for the following site urls: ! http://domain/home http://domain/forum *************** *** 26,39 **** http://domain/info/p2 http://domain/info/p3 ! */ ! function encode($url) { ! $input = array( // // What to map? // ! /* // Examples --- 31,44 ---- http://domain/info/p2 http://domain/info/p3 ! */ ! function encode($url) { ! $input = array( // // What to map? // ! /* // Examples *************** *** 42,46 **** "'(?)index.htm\?page=3($|&|\&)'", // Something "'(?)index.htm\?page=4($|&|\&)'", // Something_more ! "'(?)index.htm\?page=5($|&|\&)'", // info "'(&|\&)dynamic_block=1'", // Sub page 1 --- 47,51 ---- "'(?)index.htm\?page=3($|&|\&)'", // Something "'(?)index.htm\?page=4($|&|\&)'", // Something_more ! "'(?)index.htm\?page=5($|&|\&)'", // info "'(&|\&)dynamic_block=1'", // Sub page 1 *************** *** 48,58 **** "'(&|\&)dynamic_block=3'", // Sub page 3 */ ! ); ! $output = array( // // Map to... // ! /* "home\\1", --- 53,63 ---- "'(&|\&)dynamic_block=3'", // Sub page 3 */ ! ); ! $output = array( // // Map to... // ! /* "home\\1", *************** *** 60,75 **** "something\\1", "something_more\\1", ! ! "info\\1", ! "/p1", ! "/p2", ! "/p3", */ ! ); ! ! $url = preg_replace($input, $output, $url); ! ! return $url; ! } } --- 65,80 ---- "something\\1", "something_more\\1", ! ! "info\\1", ! "/p1", ! "/p2", ! "/p3", */ ! ); ! ! $url = preg_replace($input, $output, $url); ! ! return $url; ! } } |