6.0.0-beta1
7/7/25

[#12341] Can't edit ACLs with new Imap_Client
Summary Can't edit ACLs with new Imap_Client
Queue Horde Base
Queue Version 5.1.0
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester simon (at) simonandkate (dot) net
Created 06/12/2013 (4408 days ago)
Due
Updated 06/25/2013 (4395 days ago)
Assigned 06/24/2013 (4396 days ago)
Resolved 06/25/2013 (4395 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/25/2013 03:30:43 AM Michael Slusarz State ⇒ Not A Bug
 
06/25/2013 12:23:24 AM simon (at) simonandkate (dot) net Comment #12 Reply to this comment
You've defined an admin config in imp/backends.local.php that 
doesn't contain a password.
Thank you Michael - "Not A Bug", resolved with either addition of 
admin and password to the admin section, or removal of the section (I 
had been under the erroneous impression that the userhierarchy entry 
was needed).

I have a couple of questions on the admin functionality, but will take 
to the mailing list rather than here.
06/24/2013 06:38:44 PM Michael Slusarz Comment #11
State ⇒ Feedback
Reply to this comment
You've defined an admin config in imp/backends.local.php that doesn't 
contain a password.
06/24/2013 05:57:15 PM Michael Slusarz Comment #10 Reply to this comment
Am I reading it wrongly, or does that backtrace information show that
the ActiveSync call is using Imp IMAP auth:
I haven't been following the rest of this ticket, but to clarify - 
ActiveSync uses the same authentication backend as configured in 
Horde.
It uses the same authentication backend.  But it doesn't necessarily 
(if ever?) uses the same authentication session.  That's probably what 
he is seeing here.

06/24/2013 02:12:32 PM Michael Rubinsky Comment #9 Reply to this comment
Am I reading it wrongly, or does that backtrace information show 
that the ActiveSync call is using Imp IMAP auth:
I haven't been following the rest of this ticket, but to clarify - 
ActiveSync uses the same authentication backend as configured in Horde.

06/24/2013 11:03:12 AM simon (at) simonandkate (dot) net Comment #8 Reply to this comment
Am I reading it wrongly, or does that backtrace information show that 
the ActiveSync call is using Imp IMAP auth:

22. call_user_func_array() /usr/share/pear/Horde/Registry.php:1173
23. IMP_Application->authTransparent()
24. IMP_Auth::transparent() /var/www/horde/imp/lib/Application.php:365
25. IMP_Auth::authenticate() /var/www/horde/imp/lib/Auth.php:118
26. IMP_Imap->createImapObject() /var/www/horde/imp/lib/Auth.php:79
27. Horde_Imap_Client_Socket->__construct() 
/var/www/horde/imp/lib/Imap.php:234
28. Horde_Imap_Client_Base->__construct() 
/usr/share/pear/Horde/Imap/Client/Socket.php:171
29. Horde::debug() /usr/share/pear/Horde/Imap/Client/Base.php:255

which is successfully passing a username and password.

But the ACL edit call:

  4. call_user_func_array() /usr/share/pear/Horde/Registry.php:1173
  5. IMP_Application->authUserList()
  6. Horde_Auth_Imap->listUsers() /var/www/horde/imp/lib/Application.php:397
  7. Horde_Auth_Imap->_getOb() /usr/share/pear/Horde/Auth/Imap.php:145
  8. Horde_Imap_Client_Socket->__construct() 
/usr/share/pear/Horde/Auth/Imap.php:180
  9. Horde_Imap_Client_Base->__construct() 
/usr/share/pear/Horde/Imap/Client/Socket.php:171
10. Horde::debug() /usr/share/pear/Horde/Imap/Client/Base.php:255

Is not using the Imp IMAP auth?

Setting Horde to use IMAP Auth directly still doesn't work.
06/24/2013 10:39:33 AM simon (at) simonandkate (dot) net Comment #7 Reply to this comment
I upgraded to latest everything when I saw that there was an ACL fix 
in Imp 6.1.2. but it didn't fix it.

Question then:

My Horde and Imp setup appears to work fine, including IMAP - 
ActiveSync works OK with the IMAP server, as does Imp.

Horde is setup to use LDAP auth, and Imp is set to Horde auth. The 
IMAP server is using SASL to auth to LDAP, so everything works OK.

As far as I can see the error that I am getting thrown comes from a 
fairly fundamental check in /usr/share/pear/Horde/Imap/Client/Base.php:

         if (!isset($params['username']) || !isset($params['password'])) {
             throw new InvalidArgumentException('Horde_Imap_Client 
requires a username and password.');

If those are not set somewhere, how is my IMAP setup working at all?

Throwing a backtrace in Base.php for username and password gives me 
the following, with neither username nor password having been passed 
to the ACL edit code. As can be seen from the subsequent ActiveSync 
calls (with my CORRECT password obviously removed!) when the password 
and username are passed it works fine:

2013-06-24T10:34:15+00:00 DEBUG: Backtrace:
  1. Horde_Core_Prefs_Ui->generateUI() /var/www/horde/services/prefs.php:32
  2. IMP_Prefs_Special_Acl->display() 
/usr/share/pear/Horde/Core/Prefs/Ui.php:489
  3. Horde_Registry->callAppMethod() 
/var/www/horde/imp/lib/Prefs/Special/Acl.php:109
  4. call_user_func_array() /usr/share/pear/Horde/Registry.php:1173
  5. IMP_Application->authUserList()
  6. Horde_Auth_Imap->listUsers() /var/www/horde/imp/lib/Application.php:397
  7. Horde_Auth_Imap->_getOb() /usr/share/pear/Horde/Auth/Imap.php:145
  8. Horde_Imap_Client_Socket->__construct() 
/usr/share/pear/Horde/Auth/Imap.php:180
  9. Horde_Imap_Client_Base->__construct() 
/usr/share/pear/Horde/Imap/Client/Socket.php:171
10. Horde::debug() /usr/share/pear/Horde/Imap/Client/Base.php:255

2013-06-24T10:34:15+00:00 DEBUG: Backtrace:
  1. Horde_Core_Prefs_Ui->generateUI() /var/www/horde/services/prefs.php:32
  2. IMP_Prefs_Special_Acl->display() 
/usr/share/pear/Horde/Core/Prefs/Ui.php:489
  3. Horde_Registry->callAppMethod() 
/var/www/horde/imp/lib/Prefs/Special/Acl.php:109
  4. call_user_func_array() /usr/share/pear/Horde/Registry.php:1173
  5. IMP_Application->authUserList()
  6. Horde_Auth_Imap->listUsers() /var/www/horde/imp/lib/Application.php:397
  7. Horde_Auth_Imap->_getOb() /usr/share/pear/Horde/Auth/Imap.php:145
  8. Horde_Imap_Client_Socket->__construct() 
/usr/share/pear/Horde/Auth/Imap.php:180
  9. Horde_Imap_Client_Base->__construct() 
/usr/share/pear/Horde/Imap/Client/Socket.php:171
10. Horde::debug() /usr/share/pear/Horde/Imap/Client/Base.php:256

2013-06-24T10:34:44+00:00 DEBUG: Variable information:
string(5) "simon"

Backtrace:
  1. Horde_Rpc_ActiveSync->getResponse() /var/www/horde/rpc.php:156
  2. Horde_ActiveSync->handleRequest() 
/usr/share/pear/Horde/Rpc/ActiveSync.php:141
  3. Horde_ActiveSync_Request_Base->handle() 
/usr/share/pear/Horde/ActiveSync.php:858
  4. Horde_ActiveSync_Request_Sync->_handle() 
/usr/share/pear/Horde/ActiveSync/Request/Base.php:252
  5. Horde_ActiveSync_Collections->pollForChanges() 
/usr/share/pear/Horde/ActiveSync/Request/Sync.php:293
  6. Horde_ActiveSync_Collections->getCollectionChangeCount() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1045
  7. Horde_ActiveSync_Collections->getCollectionChanges() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1178
  8. Horde_ActiveSync_State_Sql->getChanges() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1169
  9. Horde_Core_ActiveSync_Driver->getServerChanges() 
/usr/share/pear/Horde/ActiveSync/State/Sql.php:878
10. Horde_ActiveSync_Imap_Adapter->ping() 
/usr/share/pear/Horde/Core/ActiveSync/Driver.php:650
11. Horde_ActiveSync_Imap_Adapter->_getImapOb() 
/usr/share/pear/Horde/ActiveSync/Imap/Adapter.php:564
12. Horde_Core_ActiveSync_Imap_Factory->getImapOb() 
/usr/share/pear/Horde/ActiveSync/Imap/Adapter.php:1299
13. Horde_Registry_Caller->imapOb() 
/usr/share/pear/Horde/Core/ActiveSync/Imap/Factory.php:43
14. Horde_Registry_Caller->__call() 
/usr/share/pear/Horde/Core/ActiveSync/Imap/Factory.php:43
15. Horde_Registry->call() /usr/share/pear/Horde/Registry/Caller.php:41
16. Horde_Registry->callByPackage() /usr/share/pear/Horde/Registry.php:1065
17. Horde_Registry->pushApp() /usr/share/pear/Horde/Registry.php:1105
18. Horde_Registry->hasPermission() /usr/share/pear/Horde/Registry.php:1510
19. Horde_Registry->isAuthenticated() /usr/share/pear/Horde/Registry.php:1663
20. Horde_Core_Auth_Application->transparent() 
/usr/share/pear/Horde/Registry.php:2162
21. Horde_Registry->callAppMethod() 
/usr/share/pear/Horde/Core/Auth/Application.php:366
22. call_user_func_array() /usr/share/pear/Horde/Registry.php:1173
23. IMP_Application->authTransparent()
24. IMP_Auth::transparent() /var/www/horde/imp/lib/Application.php:365
25. IMP_Auth::authenticate() /var/www/horde/imp/lib/Auth.php:118
26. IMP_Imap->createImapObject() /var/www/horde/imp/lib/Auth.php:79
27. Horde_Imap_Client_Socket->__construct() 
/var/www/horde/imp/lib/Imap.php:234
28. Horde_Imap_Client_Base->__construct() 
/usr/share/pear/Horde/Imap/Client/Socket.php:171
29. Horde::debug() /usr/share/pear/Horde/Imap/Client/Base.php:255

2013-06-24T10:34:44+00:00 DEBUG: Variable information:
string(11) "************"

Backtrace:
  1. Horde_Rpc_ActiveSync->getResponse() /var/www/horde/rpc.php:156
  2. Horde_ActiveSync->handleRequest() 
/usr/share/pear/Horde/Rpc/ActiveSync.php:141
  3. Horde_ActiveSync_Request_Base->handle() 
/usr/share/pear/Horde/ActiveSync.php:858
  4. Horde_ActiveSync_Request_Sync->_handle() 
/usr/share/pear/Horde/ActiveSync/Request/Base.php:252
  5. Horde_ActiveSync_Collections->pollForChanges() 
/usr/share/pear/Horde/ActiveSync/Request/Sync.php:293
  6. Horde_ActiveSync_Collections->getCollectionChangeCount() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1045
  7. Horde_ActiveSync_Collections->getCollectionChanges() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1178
  8. Horde_ActiveSync_State_Sql->getChanges() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1169
  9. Horde_Core_ActiveSync_Driver->getServerChanges() 
/usr/share/pear/Horde/ActiveSync/State/Sql.php:878
10. Horde_ActiveSync_Imap_Adapter->ping() 
/usr/share/pear/Horde/Core/ActiveSync/Driver.php:650
11. Horde_ActiveSync_Imap_Adapter->_getImapOb() 
/usr/share/pear/Horde/ActiveSync/Imap/Adapter.php:564
12. Horde_Core_ActiveSync_Imap_Factory->getImapOb() 
/usr/share/pear/Horde/ActiveSync/Imap/Adapter.php:1299
13. Horde_Registry_Caller->imapOb() 
/usr/share/pear/Horde/Core/ActiveSync/Imap/Factory.php:43
14. Horde_Registry_Caller->__call() 
/usr/share/pear/Horde/Core/ActiveSync/Imap/Factory.php:43
15. Horde_Registry->call() /usr/share/pear/Horde/Registry/Caller.php:41
16. Horde_Registry->callByPackage() /usr/share/pear/Horde/Registry.php:1065
17. Horde_Registry->pushApp() /usr/share/pear/Horde/Registry.php:1105
18. Horde_Registry->hasPermission() /usr/share/pear/Horde/Registry.php:1510
19. Horde_Registry->isAuthenticated() /usr/share/pear/Horde/Registry.php:1663
20. Horde_Core_Auth_Application->transparent() 
/usr/share/pear/Horde/Registry.php:2162
21. Horde_Registry->callAppMethod() 
/usr/share/pear/Horde/Core/Auth/Application.php:366
22. call_user_func_array() /usr/share/pear/Horde/Registry.php:1173
23. IMP_Application->authTransparent()
24. IMP_Auth::transparent() /var/www/horde/imp/lib/Application.php:365
25. IMP_Auth::authenticate() /var/www/horde/imp/lib/Auth.php:118
26. IMP_Imap->createImapObject() /var/www/horde/imp/lib/Auth.php:79
27. Horde_Imap_Client_Socket->__construct() 
/var/www/horde/imp/lib/Imap.php:234
28. Horde_Imap_Client_Base->__construct() 
/usr/share/pear/Horde/Imap/Client/Socket.php:171
29. Horde::debug() /usr/share/pear/Horde/Imap/Client/Base.php:256

2013-06-24T10:34:53+00:00 DEBUG: Variable information:
string(5) "simon"

Backtrace:
  1. Horde_Rpc_ActiveSync->getResponse() /var/www/horde/rpc.php:156
  2. Horde_ActiveSync->handleRequest() 
/usr/share/pear/Horde/Rpc/ActiveSync.php:141
  3. Horde_ActiveSync_Request_Base->handle() 
/usr/share/pear/Horde/ActiveSync.php:858
  4. Horde_ActiveSync_Request_Ping->_handle() 
/usr/share/pear/Horde/ActiveSync/Request/Base.php:252
  5. Horde_ActiveSync_Collections->pollForChanges() 
/usr/share/pear/Horde/ActiveSync/Request/Ping.php:201
  6. Horde_ActiveSync_Collections->getCollectionChangeCount() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1045
  7. Horde_ActiveSync_Collections->getCollectionChanges() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1178
  8. Horde_ActiveSync_State_Sql->getChanges() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1169
  9. Horde_Core_ActiveSync_Driver->getServerChanges() 
/usr/share/pear/Horde/ActiveSync/State/Sql.php:878
10. Horde_ActiveSync_Imap_Adapter->ping() 
/usr/share/pear/Horde/Core/ActiveSync/Driver.php:650
11. Horde_ActiveSync_Imap_Adapter->_getImapOb() 
/usr/share/pear/Horde/ActiveSync/Imap/Adapter.php:564
12. Horde_Core_ActiveSync_Imap_Factory->getImapOb() 
/usr/share/pear/Horde/ActiveSync/Imap/Adapter.php:1299
13. Horde_Registry_Caller->imapOb() 
/usr/share/pear/Horde/Core/ActiveSync/Imap/Factory.php:43
14. Horde_Registry_Caller->__call() 
/usr/share/pear/Horde/Core/ActiveSync/Imap/Factory.php:43
15. Horde_Registry->call() /usr/share/pear/Horde/Registry/Caller.php:41
16. Horde_Registry->callByPackage() /usr/share/pear/Horde/Registry.php:1065
17. Horde_Registry->pushApp() /usr/share/pear/Horde/Registry.php:1105
18. Horde_Registry->hasPermission() /usr/share/pear/Horde/Registry.php:1510
19. Horde_Registry->isAuthenticated() /usr/share/pear/Horde/Registry.php:1663
20. Horde_Core_Auth_Application->transparent() 
/usr/share/pear/Horde/Registry.php:2162
21. Horde_Registry->callAppMethod() 
/usr/share/pear/Horde/Core/Auth/Application.php:366
22. call_user_func_array() /usr/share/pear/Horde/Registry.php:1173
23. IMP_Application->authTransparent()
24. IMP_Auth::transparent() /var/www/horde/imp/lib/Application.php:365
25. IMP_Auth::authenticate() /var/www/horde/imp/lib/Auth.php:118
26. IMP_Imap->createImapObject() /var/www/horde/imp/lib/Auth.php:79
27. Horde_Imap_Client_Socket->__construct() 
/var/www/horde/imp/lib/Imap.php:234
28. Horde_Imap_Client_Base->__construct() 
/usr/share/pear/Horde/Imap/Client/Socket.php:171
29. Horde::debug() /usr/share/pear/Horde/Imap/Client/Base.php:255

2013-06-24T10:34:53+00:00 DEBUG: Variable information:
string(11) "************"

Backtrace:
  1. Horde_Rpc_ActiveSync->getResponse() /var/www/horde/rpc.php:156
  2. Horde_ActiveSync->handleRequest() 
/usr/share/pear/Horde/Rpc/ActiveSync.php:141
  3. Horde_ActiveSync_Request_Base->handle() 
/usr/share/pear/Horde/ActiveSync.php:858
  4. Horde_ActiveSync_Request_Ping->_handle() 
/usr/share/pear/Horde/ActiveSync/Request/Base.php:252
  5. Horde_ActiveSync_Collections->pollForChanges() 
/usr/share/pear/Horde/ActiveSync/Request/Ping.php:201
  6. Horde_ActiveSync_Collections->getCollectionChangeCount() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1045
  7. Horde_ActiveSync_Collections->getCollectionChanges() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1178
  8. Horde_ActiveSync_State_Sql->getChanges() 
/usr/share/pear/Horde/ActiveSync/Collections.php:1169
  9. Horde_Core_ActiveSync_Driver->getServerChanges() 
/usr/share/pear/Horde/ActiveSync/State/Sql.php:878
10. Horde_ActiveSync_Imap_Adapter->ping() 
/usr/share/pear/Horde/Core/ActiveSync/Driver.php:650
11. Horde_ActiveSync_Imap_Adapter->_getImapOb() 
/usr/share/pear/Horde/ActiveSync/Imap/Adapter.php:564
12. Horde_Core_ActiveSync_Imap_Factory->getImapOb() 
/usr/share/pear/Horde/ActiveSync/Imap/Adapter.php:1299
13. Horde_Registry_Caller->imapOb() 
/usr/share/pear/Horde/Core/ActiveSync/Imap/Factory.php:43
14. Horde_Registry_Caller->__call() 
/usr/share/pear/Horde/Core/ActiveSync/Imap/Factory.php:43
15. Horde_Registry->call() /usr/share/pear/Horde/Registry/Caller.php:41
16. Horde_Registry->callByPackage() /usr/share/pear/Horde/Registry.php:1065
17. Horde_Registry->pushApp() /usr/share/pear/Horde/Registry.php:1105
18. Horde_Registry->hasPermission() /usr/share/pear/Horde/Registry.php:1510
19. Horde_Registry->isAuthenticated() /usr/share/pear/Horde/Registry.php:1663
20. Horde_Core_Auth_Application->transparent() 
/usr/share/pear/Horde/Registry.php:2162
21. Horde_Registry->callAppMethod() 
/usr/share/pear/Horde/Core/Auth/Application.php:366
22. call_user_func_array() /usr/share/pear/Horde/Registry.php:1173
23. IMP_Application->authTransparent()
24. IMP_Auth::transparent() /var/www/horde/imp/lib/Application.php:365
25. IMP_Auth::authenticate() /var/www/horde/imp/lib/Auth.php:118
26. IMP_Imap->createImapObject() /var/www/horde/imp/lib/Auth.php:79
27. Horde_Imap_Client_Socket->__construct() 
/var/www/horde/imp/lib/Imap.php:234
28. Horde_Imap_Client_Base->__construct() 
/usr/share/pear/Horde/Imap/Client/Socket.php:171
29. Horde::debug() /usr/share/pear/Horde/Imap/Client/Base.php:256

06/12/2013 09:18:59 PM Michael Slusarz Comment #6 Reply to this comment
pear install -f horde/[package_name]-[version_#]
06/12/2013 07:06:30 PM simon (at) simonandkate (dot) net Comment #5 Reply to this comment
Can't reproduce.
How do I roll back the Imap Client to see if it goes away?
06/12/2013 05:55:56 PM Michael Slusarz Comment #4 Reply to this comment
Can't reproduce.
06/12/2013 07:47:43 AM simon (at) simonandkate (dot) net Comment #3 Reply to this comment

[Show Quoted Text - 20 lines]
I was checking ACLs with Horde 5.1 the other day and it was fine (due 
to Imp no longer supporting delete-inhibited folders in its native 
configuration I set some ACLs in there).

I upgraded to Imap_Client 2.11.5 today, and editing ACLs is now 
failing with the username and password message noted here where it was 
fine before. Not sure how much clearer that needs to be?

I have not changed anything in the config (Imp or anywhere else) since 
being able to edit the ACLs the other day. The reason I included the 
SMTP auth was probably a bit of a mind wander... :)
06/12/2013 07:30:26 AM arjen+horde (at) de-korte (dot) org Comment #2 Reply to this comment

[Show Quoted Text - 14 lines]
Err, please explain, what has sending mail (SMTP) to do with 
permissions on IMAP folders? I'm quite sure that the SMTP settings 
have nothing to do with this. What else do you have in 
'imp/backends.local.php'?

06/12/2013 07:23:55 AM simon (at) simonandkate (dot) net Comment #1
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ Horde Base
Summary ⇒ Can't edit ACLs with new Imap_Client
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
I updated today to Imap_Client 2.11.5.

Right click on a folder in Imp, Edit ACL:

Error:

Horde_Imap_Client requires a username and password.

I have

     'smtp' => array(
        'horde_auth' => true,

in my Imp config... Imp is sending mail no problems, as are AS clients.

Saved Queries