-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using back button after sending an email #4628
Comments
Comment by jeromeb on 16 May 2015 01:57 UTC We are facing the same issue and I was wondering if instead of raising an error we could not just redirect to the inbox as a fail-over, since the infinite loop this piece of code is trying to solve is due to a corrupt compose array. // Infinite redirect prevention in case of broken session (#1487028)
if ($COMPOSE_ID) {
$RCMAIL->output->redirect(array(
'_task' => 'mail',
'_action' => 'show',
'_mbox' => 'INBOX'
));
return;
} |
Owner changed by @alecpl on 31 Jul 2015 10:25 UTC => alec |
Milestone changed by @alecpl on 31 Jul 2015 10:25 UTC later => 1.1.3 |
Comment by @alecpl on 31 Jul 2015 10:57 UTC Here are some possible solutions:
In any case we could also do not log the error as it is not really helpful for the admin anyway. There's another issue with both of these solutions. They would not handle nicely the case when user hits the compose page with ID specified after the session expired or he set such URL in favorites, etc. To fix these we should probably display more human-friendly error with a link to "clean" compose page. |
Status changed by @alecpl on 31 Jul 2015 16:49 UTC new => closed |
Reported by mgrum on 30 Jul 2014 14:40 UTC as Trac ticket #1490009
When you click on the browser's back button after sending an email, you get back to a URL that contains the
_id
of the message you have just sent. But since there is no$_SESSION['compose_data_']
entry for this message any more, you get an error page in the browser and a log entry that saysPHP Error: Invalid compose ID
.Apparently, there are some users who do this (probably because they want to get back to the compose form to write another mail).
The obvious solution to allow this without an error would be to create a new compose ID in these cases. But there is this a comment in program/steps/compose.inc that claims it is better to abort and show the error page, because otherwise we might create infinite redirect loops. The comment references bug #1487028.
However, after reading both the code and the bug report I don't understand how these infinite redirects could happen. Even loosing the session data between the ID generation and the page reload does not cause an infinite loop, it just causes a second iteration. I think the only real possibility that could actually lead to infinite redirects would be a situation where roundcube cannot write session variables at all (but that would break a lot of things and would probably make normal usage impossible anyway).
So am I missing something? Or is it safe to disable the error message? Maybe bug #1487028 is just not relevant any more?
Migrated-From: http://trac.roundcube.net/ticket/1490009
The text was updated successfully, but these errors were encountered: