6.0.0-alpha12
6/12/25

[#4005] redirect.php - bug
Summary redirect.php - bug
Queue IMP
Queue Version 4.1.1
Type Bug
State Duplicate
Priority 1. Low
Owners
Requester maciej.niemir (at) ilim (dot) poznan (dot) pl
Created 06/05/2006 (6947 days ago)
Due
Updated 06/05/2006 (6947 days ago)
Assigned 06/05/2006 (6947 days ago)
Resolved 06/05/2006 (6947 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/05/2006 06:37:04 PM maciej (dot) niemir (at) ilim (dot) poznan (dot) pl Comment #3 Reply to this comment
OK, sorry. I'll try to be more specific:



In redirect.php is:



/* If we already have a session: */

if (isset($_SESSION['imp']) && is_array($_SESSION['imp'])) {

     /* Make sure that if a username was specified, it is the current

      * username. */

     if (($imapuser !== null && ($imapuser == $_SESSION['imp']['user'])) &&

         ($pass !== null && ($pass == 
Secret::read(Secret::getKey('imp'), $_SESSION['imp']['pass'])))) {



         /* Disable the old session. */

         unset($_SESSION['imp']);

         _redirect(Auth::addLogoutParameters(IMP::logoutUrl(), 
AUTH_REASON_FAILED));

     }



but it isn't correct, we should destroy old session and redirect to 
"failed" only when user or password in session are different than in 
$_POST, not when they are the same!


06/05/2006 04:36:57 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Why? What's the bug? And please post a unified diff instead of a code 
block, it's much clearer what you're changing that way.
06/05/2006 03:54:14 PM maciej (dot) niemir (at) ilim (dot) poznan (dot) pl Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ redirect.php - bug
Queue ⇒ IMP
Reply to this comment
In redirect.php should be:



     if (($imapuser !== null && ($imapuser !== $_SESSION['imp']['user'])) &&

         ($pass !== null && ($pass !== 
Secret::read(Secret::getKey('imp'), $_SESSION['imp']['pass'])))) {



         /* Disable the old session. */

         unset($_SESSION['imp']);

         _redirect(Auth::addLogoutParameters(IMP::logoutUrl(), 
AUTH_REASON_FAILED));

     }

Saved Queries