Changeset ace8517 in github


Ignore:
Timestamp:
Oct 12, 2010 2:03:02 PM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
6635344
Parents:
fddd6f2
Message:
  • Prevent from infinite redirect in case of broken session (#1487028)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/steps/mail/compose.inc

    rba12c76 race8517  
    3434// compose when a "new/forward/reply/draft" is called - otherwise the old session attachments will appear 
    3535 
    36 if (!is_array($_SESSION['compose']) || $_SESSION['compose']['id'] != get_input_value('_id', RCUBE_INPUT_GET)) 
     36$MESSAGE_ID = get_input_value('_id', RCUBE_INPUT_GET); 
     37if (!is_array($_SESSION['compose']) || $_SESSION['compose']['id'] != $MESSAGE_ID) 
    3738{ 
    3839  rcmail_compose_cleanup(); 
     40 
     41  // Infinite redirect prevention in case of broken session (#1487028) 
     42  if ($MESSAGE_ID) 
     43    raise_error(array('code' => 500, 'type' => 'php', 
     44      'file' => __FILE__, 'line' => __LINE__, 
     45      'message' => "Invalid session"), true, true); 
     46 
    3947  $_SESSION['compose'] = array( 
    4048    'id' => uniqid(mt_rand()), 
Note: See TracChangeset for help on using the changeset viewer.