[horde] Problem with case sensitive username

Jan Schneider jan at horde.org
Tue Aug 13 20:13:36 UTC 2013


Zitat von Robert Wagner <robert at gmx.li>:

> Hello,
>
> i use imap as login backend, loginname is the full mailadress.
>
> Usually i log in all lowercase: name at example.com
> by accident i typed name at Example.com
>
> Log-in works, but the portal throws:
>
>
> 2013-08-13T15:19:09+00:00 EMERG: HORDE [horde] exception  
> 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint  
> violation: 1062 Duplicate entry 'name at Example.com' for key  
> 'rampage_users_user_name'' in  
> /usr/share/php/Horde/Db/Adapter/Base.php:551
> Stack trace:
> #0 /usr/share/php/Horde/Db/Adapter/Base.php(551): PDO->query('INSERT  
> INTO `ra...')
> #1 /usr/share/php/Horde/Db/Adapter/Base.php(584):  
> Horde_Db_Adapter_Base->execute('INSERT INTO `ra...', NULL, NULL)
> #2 /usr/share/horde5/content/lib/Users/Manager.php(75):  
> Horde_Db_Adapter_Base->insert('INSERT INTO `ra...')
> #3 /usr/share/horde5/trean/lib/Bookmarks.php(30):  
> Content_Users_Manager->ensureUsers('name at Example.com')
> #4 [internal function]:  
> Trean_Bookmarks->__construct(Object(Content_Users_Manager))
> #5 /usr/share/php/Horde/Injector/Binder/Implementation.php(86):  
> ReflectionClass->newInstanceArgs(Array)
> #6 /usr/share/php/Horde/Injector/Binder/Implementation.php(66):  
> Horde_Injector_Binder_Implementation->_getInstance(Object(Horde_Injector),  
> Object(ReflectionClass))
> #7 /usr/share/php/Horde/Injector/Binder/AnnotatedSetters.php(69):  
> Horde_Injector_Binder_Implementation->create(Object(Horde_Injector))
> #8 /usr/share/php/Horde/Injector.php(213):  
> Horde_Injector_Binder_AnnotatedSetters->create(Object(Horde_Injector))
> #9 /usr/share/php/Horde/Injector.php(247):  
> Horde_Injector->createInstance('Trean_Bookmarks')
> #10 /usr/share/horde5/trean/lib/Application.php(65):  
> Horde_Injector->getInstance('Trean_Bookmarks')
> #11 /usr/share/php/Horde/Registry/Application.php(105):  
> Trean_Application->_init()
> #12 [internal function]: Horde_Registry_Application->init()
> #13 /usr/share/php/Horde/Registry.php(1174):  
> call_user_func_array(Array, Array)
> #14 /usr/share/php/Horde/Registry.php(1561):  
> Horde_Registry->callAppMethod('trean', 'init')
> #15 /usr/share/php/Horde/Registry.php(1921): Horde_Registry->pushApp('trean')
> #16 /usr/share/php/Horde/Core/Block/Collection.php(43):  
> Horde_Registry->getAppDrivers('trean', 'Block')
> #17 /usr/share/php/Horde/Core/Factory/BlockCollection.php(61):  
> Horde_Core_Block_Collection->__construct(Array, 'portal_layout')
> #18 /usr/share/horde5/services/portal/index.php(31):  
> Horde_Core_Factory_BlockCollection->create()
> #19 {main}
>
>
>
>
>
> Next exception 'Horde_Db_Exception' with message 'SQLSTATE[23000]:  
> Integrity constraint violation: 1062 Duplicate entry  
> 'name at Example.com' for key 'rampage_users_user_name'' in  
> /usr/share/php/Horde/Db/Adapter/Base.php:555
> Stack trace:
> #0 /usr/share/php/Horde/Db/Adapter/Base.php(584):  
> Horde_Db_Adapter_Base->execute('INSERT INTO `ra...', NULL, NULL)
> #1 /usr/share/horde5/content/lib/Users/Manager.php(75):  
> Horde_Db_Adapter_Base->insert('INSERT INTO `ra...')
> #2 /usr/share/horde5/trean/lib/Bookmarks.php(30):  
> Content_Users_Manager->ensureUsers('name at Example.com')
> #3 [internal function]:  
> Trean_Bookmarks->__construct(Object(Content_Users_Manager))
> #4 /usr/share/php/Horde/Injector/Binder/Implementation.php(86):  
> ReflectionClass->newInstanceArgs(Array)
> #5 /usr/share/php/Horde/Injector/Binder/Implementation.php(66):  
> Horde_Injector_Binder_Implementation->_getInstance(Object(Horde_Injector),  
> Object(ReflectionClass))
> #6 /usr/share/php/Horde/Injector/Binder/AnnotatedSetters.php(69):  
> Horde_Injector_Binder_Implementation->create(Object(Horde_Injector))
> #7 /usr/share/php/Horde/Injector.php(213):  
> Horde_Injector_Binder_AnnotatedSetters->create(Object(Horde_Injector))
> #8 /usr/share/php/Horde/Injector.php(247):  
> Horde_Injector->createInstance('Trean_Bookmarks')
> #9 /usr/share/horde5/trean/lib/Application.php(65):  
> Horde_Injector->getInstance('Trean_Bookmarks')
> #10 /usr/share/php/Horde/Registry/Application.php(105):  
> Trean_Application->_init()
> #11 [internal function]: Horde_Registry_Application->init()
> #12 /usr/share/php/Horde/Registry.php(1174):  
> call_user_func_array(Array, Array)
> #13 /usr/share/php/Horde/Registry.php(1561):  
> Horde_Registry->callAppMethod('trean', 'init')
> #14 /usr/share/php/Horde/Registry.php(1921): Horde_Registry->pushApp('trean')
> #15 /usr/share/php/Horde/Core/Block/Collection.php(43):  
> Horde_Registry->getAppDrivers('trean', 'Block')
> #16 /usr/share/php/Horde/Core/Factory/BlockCollection.php(61):  
> Horde_Core_Block_Collection->__construct(Array, 'portal_layout')
> #17 /usr/share/horde5/services/portal/index.php(31):  
> Horde_Core_Factory_BlockCollection->create()
> #18 {main}
>
>
> Bug or a problem with my setup/database?

The latter. Use a user name hook if your authentication backend is  
case insensitive.
-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the horde mailing list