|
From: Jon O. <jon...@us...> - 2006-06-17 20:45:26
|
Update of /cvsroot/mxbb/core/modules/mx_mod_rewrite/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4108/modules/mx_mod_rewrite/includes Modified Files: rewrite_constants.php rewrite_functions.php Log Message: security Index: rewrite_constants.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_mod_rewrite/includes/rewrite_constants.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rewrite_constants.php 5 Apr 2006 20:58:16 -0000 1.2 --- rewrite_constants.php 17 Jun 2006 20:45:22 -0000 1.3 *************** *** 8,12 **** * */ ! // ------------------------------------------------------------------------- // Extend User Style with module lang and images --- 8,17 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! // ------------------------------------------------------------------------- // Extend User Style with module lang and images Index: rewrite_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_mod_rewrite/includes/rewrite_functions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rewrite_functions.php 5 Apr 2006 20:58:16 -0000 1.2 --- rewrite_functions.php 17 Jun 2006 20:45:22 -0000 1.3 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + // // Module functions class *************** *** 18,32 **** { global $mx_root_path; ! // // First redirect to *.htm // ! $input = array( "'(?)index.php'", ! ); $output = array( "index.htm", ! ); ! $url = preg_replace($input, $output, $url); // --- 23,37 ---- { global $mx_root_path; ! // // First redirect to *.htm // ! $input = array( "'(?)index.php'", ! ); $output = array( "index.htm", ! ); ! $url = preg_replace($input, $output, $url); // *************** *** 36,44 **** { include_once( $mx_root_path . 'modules/mx_mod_rewrite/includes/rewrite_custom_defs.php' ); ! if (class_exists('mx_mod_rewrite_custom')) { $mx_mod_rewrite_custom = new mx_mod_rewrite_custom(); ! if ( method_exists( $mx_mod_rewrite_custom, 'encode' ) ) { --- 41,49 ---- { include_once( $mx_root_path . 'modules/mx_mod_rewrite/includes/rewrite_custom_defs.php' ); ! if (class_exists('mx_mod_rewrite_custom')) { $mx_mod_rewrite_custom = new mx_mod_rewrite_custom(); ! if ( method_exists( $mx_mod_rewrite_custom, 'encode' ) ) { *************** *** 47,56 **** } } ! // // Now do a standard mxBB mapping // - the keys are defined in the lang files ! // ! $input = array( // // General --- 52,61 ---- } } ! // // Now do a standard mxBB mapping // - the keys are defined in the lang files ! // ! $input = array( // // General *************** *** 60,77 **** "'(&|\&)dynamic_block=([0-9]*)'", "'(&|\&)cat_link=([0-9]*)'", ! ); $output = array( // // General ! // ! "page\\1", ! "block\\1", ! "/sub\\2", ! "/catlink\\2", ! ); ! $url = preg_replace($input, $output, $url); ! ! return $url; ! } } ?> \ No newline at end of file --- 65,82 ---- "'(&|\&)dynamic_block=([0-9]*)'", "'(&|\&)cat_link=([0-9]*)'", ! ); $output = array( // // General ! // ! "page\\1", ! "block\\1", ! "/sub\\2", ! "/catlink\\2", ! ); ! $url = preg_replace($input, $output, $url); ! ! return $url; ! } } ?> \ No newline at end of file |