Summary | Horde authentification: SQL Custom |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | mrubinsk (at) horde (dot) org |
Requester | torben (at) dannhauer (dot) info |
Created | 04/11/2011 (5189 days ago) |
Due | |
Updated | 04/14/2011 (5186 days ago) |
Assigned | 04/13/2011 (5187 days ago) |
Resolved | 04/14/2011 (5186 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
sorry, wrong alarm, it seems also to work with socket if I do not
specify the path to the socket.
thanks a lot!
Torben
I copied this files into my pear installation:
- framework/Auth/lib/Horde/Auth/Cyrsql.php
- framework/Auth/lib/Horde/Auth/Imap.php
- framework/Core/lib/Horde/Core/Auth/Signup/Sql.php
- framework/Core/lib/Horde/Core/Factory/Auth.php
- framework/Core/lib/Horde/Core/Factory/Db.php
with postgreSQL and TCP/IP (localhost) it works, with postgreSQL and
unix_socket it does not work.
The error is similar to the error you fixed for me:
Could not instantiate PDO with DSN
"pgsql:host=localhost;dbname=my_db;unix_socket=/var/run/postgresql/".
PDOException: SQLSTATE[08006] [7] ungültige Verbindungsoption (means:
invalid option) »unix_socket«
Questions: Why is localhost there mentioned? Its socket, not tcp/ip.
and pgsql doesn't like 'unix_socket' it seems :)
Maybe your have to apply your changes also for pgsql via socket?
Thank you for your help!
Torben
contain fields that are generated when using the cyrus sql driver,
not the custom sql driver as you said you used.
Regardless, I reverted the previous commit and committed a more
appropriate fix. Should be fixed now.
the sub-seletion PostgreSQL.
'Ill test it.
What files are affected?
thanks anyway!
Torben
State ⇒ Resolved
contain fields that are generated when using the cyrus sql driver, not
the custom sql driver as you said you used.
Regardless, I reverted the previous commit and committed a more
appropriate fix. Should be fixed now.
Bug: 9879- More fields to sanitize for custom sql auth drivers1 files changed, 6 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/6b93dd448cd446adefac3bd21875af5f084eb734
access to my source tree until later tonight.
my auth part of horde/config/conf.php is:
$conf['auth']['admins'] = array('Administrator', 'user@domain.tld');
$conf['auth']['checkip'] = true;
$conf['auth']['checkbrowser'] = true;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;
$conf['auth']['list_users'] = 'input';
$conf['auth']['params']['persistent'] = true;
$conf['auth']['params']['username'] = 'db_user';
$conf['auth']['params']['password'] = 'db_pass';
$conf['auth']['params']['hostspec'] = 'localhost';
$conf['auth']['params']['protocol'] = 'tcp';
$conf['auth']['params']['database'] = 'non_horde_auth_db';
$conf['auth']['params']['charset'] = 'utf-8';
$conf['auth']['params']['phptype'] = 'pgsql';
$conf['auth']['params']['driverconfig'] = 'custom';
$conf['auth']['params']['table'] = 'auth_table;
$conf['auth']['params']['username_field'] = 'user_field';
$conf['auth']['params']['password_field'] = 'pw_field';
$conf['auth']['params']['encryption'] = 'crypt-md5';
$conf['auth']['params']['show_encryption'] = false;
$conf['auth']['driver'] = 'sql';
I only copied your modified file from the git repo into the horde
installation of the pear package.
do I need other files to update?
Thanks, Torben
Assigned to Michael Rubinsky
State ⇒ Feedback
Priority ⇒ 2. Medium
sanitize the parameters used to instantiate a Horde_Db_Adapter
Possibly fixes
Bug: 98791 files changed, 14 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/e457307312c03f50d0b2dc9f2c13bf22673c4ca3
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Horde authentification: SQL Custom
Type ⇒ Bug
Priority ⇒ 3. High
Switching the Horde authentication from IMAP to SQL with custom
settings, the PDO instantation crashed. The Pdo seems to have problems
with the connection parameters, maybe some kind of mis-parsing...
Details:
Horde H4.
Horde SQL Auth -> Custom -> pgsql (PostgreSQL 9.0, PHP Version 5.3.3-7)
Error Message:
Could not instantiate PDO with DSN
"pgsql:driverconfig=custom;table=my_user_table;username_field=_my_user_name;password_field=_my_user_password;host=localhost;dbname=other_than_horde_db". PDOException: SQLSTATE[08006] [7] ungültige Verbindungsoption(means: invalid connection option)
»driverconfig«
callstack:
1. Horde_Registry::appInit()
/usr/share/php/www/horde/admin/config/config.php:12
2. Horde_Registry->__construct() /usr/share/php/Horde/Registry.php:231
3. Horde_Injector->getInstance() /usr/share/php/Horde/Registry.php:440
4. Horde_Injector->createInstance() /usr/share/php/Horde/Injector.php:248
5. Horde_Injector_Binder_Factory->create()
/usr/share/php/Horde/Injector.php:213
6. Horde_Core_Factory_Notification->create()
/usr/share/php/Horde/Injector/Binder/Factory.php:111
7. Horde_Registry->listApps()
/usr/share/php/Horde/Core/Factory/Notification.php:20
8. Horde_Registry->hasPermission() /usr/share/php/Horde/Registry.php:781
9. Horde_Registry->isAuthenticated() /usr/share/php/Horde/Registry.php:1399
10. Horde_Registry->checkExistingAuth() /usr/share/php/Horde/Registry.php:1823
11. Horde_Core_Factory_Auth->create() /usr/share/php/Horde/Registry.php:2191
12. Horde_Core_Factory_Auth->_create()
/usr/share/php/Horde/Core/Factory/Auth.php:61
13. Horde_Core_Factory_Db->create()
/usr/share/php/Horde/Core/Factory/Auth.php:183
14. Horde_Core_Factory_Db->createDb()
/usr/share/php/Horde/Core/Factory/Db.php:88
15. Horde_Db_Adapter_Base->__construct()
/usr/share/php/Horde/Core/Factory/Db.php:151
16. Horde_Db_Adapter_Pdo_Pgsql->connect()
/usr/share/php/Horde/Db/Adapter/Base.php:143
17. Horde_Db_Adapter_Pdo_Base->connect()
/usr/share/php/Horde/Db/Adapter/Pdo/Pgsql.php:88