--- chatroomread.php2 2006-11-21 08:22:53.000000000 -0800 +++ chatroomread.php 2006-11-21 08:57:39.000000000 -0800 @@ -54,6 +54,9 @@ if (isset($_POST['smileys_base'])) { } } $smileys = isset($smileys_module_file); +//save this variable in POST since drupal_unset_globals will delete $smileys +//when register_globals is on (see #78920) +$_POST['smileys'] = $smileys; /** * chat request code @@ -82,14 +85,9 @@ if (isset($_POST['chat_id'])) { } } - // get the request values we're interested in + // get the request values we're interested in before drupal_bootsrap $browser_timestamp = $_POST['timestamp']; - $update_count = $_POST['update_count']; - $chat_id = $_POST['chat_id']; - $last_msg_id = $_POST['last_msg_id']; $chat_cache_file = urldecode($_POST['chat_cache_file']); - $online_list = isset($_POST['online_list']) ? true : false; - $timezone = isset($_POST['timezone']) ? $_POST['timezone'] : 0; if ($write_request === false) { // see if we have a cache hit by comparing the timestamps @@ -110,6 +108,18 @@ if (isset($_POST['chat_id'])) { } drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION); + //make sure Apache configurations with register_globals on + //get variables (see #78920 on drupal.org) + $browser_timestamp = $_POST['timestamp']; + $update_count = $_POST['update_count']; + $chat_id = $_POST['chat_id']; + $last_msg_id = $_POST['last_msg_id']; + $chat_cache_file = urldecode($_POST['chat_cache_file']); + $online_list = isset($_POST['online_list']) ? true : false; + $timezone = isset($_POST['timezone']) ? $_POST['timezone'] : 0; + $write_request = $write_request = empty($_POST['chatroomMsg']) ? false : true; + $smileys = $_POST['smileys']; + $recipient = empty($_POST['recipient']) ? "" : $_POST['recipient']; $type = is_null($_POST['type']) ? "msg" : $_POST['type']; @@ -166,13 +176,27 @@ if (isset($_POST['block_update'])) { if ($chat_cache_hit && $room_cache_hit && !isset($_POST['uid'])) { exit; } + + //make sure Apache configurations with register_globals on + //get variables (see #78920 on drupal.org) + $_POST['room_cache_file'] = $room_cache_file; + $_POST['room_cache_hit'] = $room_cache_hit; + $_POST['chat_cache_file'] = $chat_cache_file; + $_POST['chat_cache_hit'] = $chat_cache_hit; // cache miss, so bootstrap drupal - $room_js = $chat_js = $user_js = '[]'; require './includes/bootstrap.inc'; require $user_module_file; require $chatroom_module_file; drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION); + $room_js = $chat_js = $user_js = '[]'; + + //make sure Apache configurations with register_globals on + //get variables (see #78920 on drupal.org) + $room_cache_file = $_POST['room_cache_file']; + $room_cache_hit = $_POST['room_cache_hit']; + $chat_cache_file = $_POST['chat_cache_file']; + $chat_cache_hit = $_POST['chat_cache_hit']; // get the js for the cache misses if (!$chat_cache_hit) {