[Tickets #13105] call of prefs_init() for non-existant user f and entries in history table with history_who == 'f'

noreply at bugs.horde.org noreply at bugs.horde.org
Thu Apr 10 14:35:55 UTC 2014


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/13105
------------------------------------------------------------------------------
  Ticket             | 13105
  Created By         | skhorde at smail.inf.fh-bonn-rhein-sieg.de
  Summary            | call of prefs_init() for non-existant user f and
                     | entries in history table with history_who == 'f'
  Queue              | Horde Base
  Version            | 5.1.6
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


skhorde at smail.inf.fh-bonn-rhein-sieg.de (2014-04-10 14:35) wrote:

The problem reported on the Horde user list with subject "in  
horde_histories history_who = 'f'" exists in current Horde PEAR  
version, snippet of pear list

Horde_Core                2.11.1  stable
horde                     5.1.6   stable
kronolith                 4.1.5   stable

http://thread.gmane.org/gmane.comp.horde.user/34646/focus=34661

When a CalDAV client access a calendar, kronolith's prefs_init() is  
called for a non-existant user "f" and entries are logged to the  
histories table, where history_who == 'f'. The user information is  
queried, even if you prevent entries with history_who == 'f', e.g. by  
overriding that value in History.php. I mean, entries in histories do  
not cause the call of prefs_init() for user "f".

Attached you find a patch that work arounds both problems. I had  
posted a former, more generic version to the mailing list.

Following Micheal's idea about calling Injector too early, I tested  
what happens if the instance of Horde_History is recreated once the  
authentification is present.

         if($GLOBALS['registry']->getAuth()
         || !in_array($interface, array( 'Horde_History', 'Horde_Core_Hooks' ))
         ) {
               $this->_instances[$interface] = $instance;
			unset($this->_instances_noauth[$interface]);	// free ressources
         } else {  // make temp instance
			$this->_instances_noauth[$interface] = $instance;
		}
         return $this;

'Horde_History' suppresses the items with huistory_who == 'f'

'Horde_Core_Hooks' suppresses the calls of prefs_init() with username == "f"




skhorde at smail.inf.fh-bonn-rhein-sieg.de (2014-04-10 14:35) uploaded:  
injector_userid-f.diff.bz2

http://bugs.horde.org/h/services/download/?app=whups&actionID=download_file&file=injector_userid-f.diff.bz2&ticket=13105&fn=%2Finjector_userid-f.diff.bz2





More information about the bugs mailing list