fix decryption of ipv6 headers (thanks Tomas Kuliavas)
[squirrelmail.git] / src / redirect.php
index de8877634f7a03de8e58024a2320bdaeaed35a45..ae1fedf616353b82afd2d97e8339b91f530a05c3 100644 (file)
@@ -144,14 +144,14 @@ $redirect_url = $location . '/webmail.php';
 
 if ( sqgetGlobalVar('session_expired_location', $session_expired_location, SQ_SESSION) ) {
     sqsession_unregister('session_expired_location');
-    if ( strpos($session_expired_location, 'compose.php') !== FALSE ) {
+    if ( $session_expired_location == 'compose' ) {
         $compose_new_win = getPref($data_dir, $username, 'compose_new_win', 0);
         if ($compose_new_win) {
-            // do not prefix $location here because $session_expired_location is set to PHP_SELF
+            // do not prefix $location here because $session_expired_location is set to the PAGE_NAME
             // of the last page
-            $redirect_url = $session_expired_location;
+            $redirect_url = $session_expired_location.'.php';
         } else {
-            $redirect_url = $location.'/webmail.php?right_frame='.urlencode($session_expired_location);
+            $redirect_url = $location.'/webmail.php?right_frame='.urlencode($session_expired_location).'php';
         }
     }
     unset($session_expired_location);