6.0.0-beta1
11/9/25

[#3968] ACL tool does not list newly created ACL
Summary ACL tool does not list newly created ACL
Queue IMP
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners
Requester ekg2002 (at) columbia (dot) edu
Created 05/23/2006 (7110 days ago)
Due
Updated 06/24/2006 (7078 days ago)
Assigned 05/24/2006 (7109 days ago)
Resolved 06/24/2006 (7078 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/24/2006 08:23:38 AM Matt Selsky Comment #11
State ⇒ Resolved
Reply to this comment
I just committed a fix for _connect() to solve the foreach() warning.   
Looks OK here on both PHP4 and PHP5 systems.
06/24/2006 07:44:16 AM Matt Selsky Comment #10 Reply to this comment
Warning: Invalid argument supplied for foreach() in 
/etc/httpd/htdocs/horde/imp/acl.php on line 141

Warning: Invalid argument supplied for foreach() in 
/etc/httpd/htdocs/horde/imp/acl.php on line 180
06/23/2006 11:20:18 PM Michael Slusarz Comment #9 Reply to this comment
Try what I just committed to HEAD and 3.1.2.
06/23/2006 07:51:44 AM Jan Schneider Comment #8 Reply to this comment
Instead of checking for the PHP version, you should check if 
imap_getacl() exists, this is semantically more correct. Also, all 
imap_* calls (beside the imap_error* calls) need to be silenced. And 
you shouldn't use $_connected, but instead check in _connect() whether 
the connection has already been made.

Beside that, looks good.
06/23/2006 04:12:31 AM Matt Selsky Comment #7
New Attachment: imap_getacl.patch Download
Reply to this comment
How's this look?
06/23/2006 01:44:28 AM ekg2002 (at) columbia (dot) edu Comment #6 Reply to this comment
I vote for Chuck's suggestion.
06/23/2006 01:32:46 AM Chuck Hagenbuch Comment #5 Reply to this comment
1) Add a sleep() before the GETACL (or after the SETACL) to allow
time for propogation to occur.
2) Store the ACL information on the client and use that instead of
asking the server again.
3) Use PHP5's imap_getacl() if available since it will use the same
stream (aka same server) as the SETACL.

None of these seem correct.
Aside from not being comprehensive, what's wrong with the php 5 
solution? Could even combine it with the sleep(), only sleeping for 
php 4. Not pretty, but at least it's compartmentalized.
06/22/2006 10:40:45 PM Matt Selsky Comment #4 Reply to this comment
We're using Cyrus 2.3 with Murder.  What seems to be happening is that 
SETACL and GETACL are run on different Cyrus front-end servers.  The 
ACL information hasn't propogated to all servers by the time GETACL is 
run so the data is stale.  Options include:



1) Add a sleep() before the GETACL (or after the SETACL) to allow time 
for propogation to occur.

2) Store the ACL information on the client and use that instead of 
asking the server again.

3) Use PHP5's imap_getacl() if available since it will use the same 
stream (aka same server) as the SETACL.



None of these seem correct.
05/24/2006 09:17:38 AM Jan Schneider Comment #3
State ⇒ Feedback
Reply to this comment
Works perfectly for me here with Cyrus 2.2.12 and PLAIN authentication.
05/24/2006 12:36:59 AM ekg2002 (at) columbia (dot) edu Comment #2
New Attachment: acldiag.png Download
Reply to this comment
After some investigation Matt Selsky and I have obtained some more 
information.



First of all, we're running Cyrus IMAP with RFC 2086 ACL support.



It seems that the query made in the connection created in Horde's 
_getACL() in rfc2086.php is not obtaining the correct information 
after the imap_setacl() function is invoked earlier in the page load.



Upon submitting a new acl, imap_setacl is called with the new 
information. For testing purposes, I inserted an imap_getacl (> PHP 5) 
call immediately after this and the returned array contains the 
correct information.



Later in invocation, _getACL executes a standard IMAP GETACL query, 
but the server response does not contain the newly created ACL, 
meaning the array returned by _getACL is incorrect.



Attached is a screenshot that shows this information.
05/23/2006 01:49:17 AM ekg2002 (at) columbia (dot) edu Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ ACL tool does not list newly created ACL
Queue ⇒ IMP
New Attachment: acl_fail.png Download
State ⇒ Unconfirmed
Reply to this comment
After submitting a new ACL, the tool confirms the ACL was created but 
does not show the ACL in the list. See attached screenshot.

Saved Queries