Fix error when using back button after sending an email (#1490009)
| | |
| | | - Fix bug where new messages weren't added to the list in search mode |
| | | - Fix wrong positioning of message list header on page scroll in Webkit browsers (#1490035) |
| | | - Fix some javascript errors in rare situations (#1490441) |
| | | - Fix error when using back button after sending an email (#1490009) |
| | | |
| | | RELEASE 1.1.2 |
| | | ------------- |
| | |
| | | |
| | | // prevent redirect to compose with specified ID (#1488226) |
| | | if ($query['_action'] == 'compose' && !empty($query['_id'])) { |
| | | $query = array(); |
| | | $query = array('_action' => 'compose'); |
| | | } |
| | | } |
| | | |
| | |
| | | $messages['errcsrfprotectionexplain'] = "For your protection, access to this resource is secured against CSRF.\nIf you see this, you probably didn't log out before leaving the web application.\n\nHuman interaction is now required to continue."; |
| | | $messages['errcontactserveradmin'] = 'Please contact your server-administrator.'; |
| | | $messages['clicktoresumesession'] = 'Click here to resume your previous session'; |
| | | |
| | | ?> |
| | | $messages['errcomposesession'] = 'Compose session error'; |
| | | $messages['errcomposesessionexplain'] = 'Requested compose session not found.'; |
| | | $messages['clicktocompose'] = 'Click here to compose a new message'; |
| | |
| | | if (!is_array($COMPOSE)) { |
| | | // Infinite redirect prevention in case of broken session (#1487028) |
| | | if ($COMPOSE_ID) { |
| | | rcube::raise_error(array('code' => 500, 'type' => 'php', |
| | | 'file' => __FILE__, 'line' => __LINE__, |
| | | 'message' => "Invalid compose ID"), true, true); |
| | | // if we know the message with specified ID was already sent |
| | | // we can ignore the error and compose a new message (#1490009) |
| | | if ($COMPOSE_ID != $_SESSION['last_compose_session']) { |
| | | rcube::raise_error(array('code' => 450), false, true); |
| | | } |
| | | } |
| | | |
| | | $COMPOSE_ID = uniqid(mt_rand()); |
| | |
| | | } |
| | | |
| | | /** |
| | | * clear message composing settings |
| | | */ |
| | | function rcmail_compose_cleanup($id) |
| | | { |
| | | if (!isset($_SESSION['compose_data_'.$id])) { |
| | | return; |
| | | } |
| | | |
| | | $rcmail = rcmail::get_instance(); |
| | | $rcmail->plugins->exec_hook('attachments_cleanup', array('group' => $id)); |
| | | $rcmail->session->remove('compose_data_'.$id); |
| | | } |
| | | |
| | | /** |
| | | * Send the MDN response |
| | | * |
| | | * @param mixed $message Original message object (rcube_message) or UID |
| | |
| | | |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * clear message composing settings |
| | | */ |
| | | function rcmail_compose_cleanup($id) |
| | | { |
| | | if (!isset($_SESSION['compose_data_'.$id])) { |
| | | return; |
| | | } |
| | | |
| | | $rcmail = rcmail::get_instance(); |
| | | $rcmail->plugins->exec_hook('attachments_cleanup', array('group' => $id)); |
| | | $rcmail->session->remove('compose_data_'.$id); |
| | | |
| | | $_SESSION['last_compose_session'] = $id; |
| | | } |
| | |
| | | $__error_text .= '<p><i>' . $rcmail->gettext('errfailedrequest') . ":</i><br />\n<tt>//$request_url</tt></p>"; |
| | | } |
| | | |
| | | // invalid compose ID |
| | | else if ($ERROR_CODE == 450 && $_SERVER['REQUEST_METHOD'] == 'GET' && $rcmail->action == 'compose') { |
| | | $url = $rcmail->url('compose'); |
| | | |
| | | $__error_title = strtoupper($rcmail->gettext('errcomposesession')); |
| | | $__error_text = nl2br($rcmail->gettext('errcomposesessionexplain')) |
| | | . '<p>' . html::a($url, $rcmail->gettext('clicktocompose')) . '</p>'; |
| | | } |
| | | |
| | | // database connection error |
| | | else if ($ERROR_CODE == 601) { |
| | | $__error_title = "CONFIGURATION ERROR"; |