Bugs #2314: groupdav.php: An error happened Wrong domain! '' != 'default'

Ticket modified by Jörg Lehrke at 2010/09/25 11:18
Tracking System: Bugs
Category: GroupDAV
Version: Version 1.6.003
Status: Closed
Resolution: Fixed
Completed: 100%
Priority: 5 - medium
Created By: Hans-Juergen Tappe
Assigned to: Jörg Lehrke
Summary: #2314 - groupdav.php: An error happened Wrong domain! ‘’ != 'default’
The “session wake-up” does not initialize the
$this->account_domain correctly, at least for groupdav.php.

This is how you can reproduce the situation:

  • Open thunderbird with lightning and include some groupdav.php calendar.
  • Close Thunderbird.
  • Change the IP address (e.g. move your laptop from work to home or
    acquire a new DHCP lease after some hibernating)
  • Open Thunderbird with Lightning
  • $this->account_domain is ‘’

— phpgwapi/inc/class.egw_session.inc.php (Revision 28075)
+++ phpgwapi/inc/class.egw_session.inc.php (Arbeitskopie)
@@ -830,6 +830,11 @@
// This is to ensure that we authenticate to the correct domain …
if($GLOBALS[‘egw_info’][‘user’][‘domain’] &&
$this->account_domain != $GLOBALS[‘egw_info’][‘user’][‘domain’])
{

  • // If this is not our session, inform the caller to create a new session.
  • if (!$this->account_domain)
  • {
  •   return false;
    
  • }
    throw new Exception(“Wrong domain! ‘$this->account_domain’ !=
    ’{$GLOBALS[‘egw_info’][‘user’][‘domain’]}’”);

Another poster mentioned that the use of anothre exception type and a catch of this exception (in the session validation code) might be another option.
Comment by Hans-Juergen Tappe at 2010/03/26 19:55:
Well yes, the 1.6.003 version does not show the problem any more. But you did not implement the
if (!$this->account_domain)
around the return, so the following exception code is left as dead code. Shouldn’t this also be removed?

Thanks for committing this.
Hans-Jürgen
Comment by Jörg Lehrke at 2010/03/15 18:36:
Hi Hans-Juergen, could you please check with the latest versions and confirm that this issue is solved.

linked entries:
http://www.egroupware.org/egroupware/index.php?menuaction=tracker.tracker_ui.edit&tr_id=2314&no_popup=1