From 0129d7c914f4d9247a7e8bb5ff5f655cfa98de1f Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Mon, 19 Jan 2009 03:38:14 -0500
Subject: [PATCH] - Fix authentication when submitting form with existing session (#1485679)

---
 CHANGELOG |    1 +
 index.php |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 492a3da..f9ce6de 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,7 @@
 ----------
 - Fix problems with backslash as IMAP hierarchy delimiter (#1484467)
 - Secure vcard export by getting rid of preg's 'e' modifier use (#1485689)
+- Fix authentication when submitting form with existing session (#1485679)
 
 2009/01/15 (alec)
 ----------
diff --git a/index.php b/index.php
index d57c91e..172d57c 100644
--- a/index.php
+++ b/index.php
@@ -72,6 +72,10 @@
 
 // try to log in
 if ($RCMAIL->action=='login' && $RCMAIL->task=='mail') {
+  // purge the session in case of new login when a session already exists 
+  $RCMAIL->kill_session(); 
+  
+  // set IMAP host
   $host = $RCMAIL->autoselect_host();
   
   // check if client supports cookies

--
Gitblit v1.9.1