You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by bu...@apache.org on 2005/10/10 04:45:41 UTC
DO NOT REPLY [Bug 36981] New: -
Unlocking a file owned by another user doesn't work
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36981>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36981
Summary: Unlocking a file owned by another user doesn't work
Product: Slide
Version: Nightly
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: Core
AssignedTo: slide-dev@jakarta.apache.org
ReportedBy: paul.okeeffe@suncorp.com.au
User A locks a file.
User B attempts to unlock the file.
Unlock attempt fails with a 423 Locked error, rather than succeeding with a 204
No Content response.
User B does have the necessary security permissions to unlock the file locked
by user A.
The functional test killLock.xml directly tests this case and fails using the
mem configuration.
Looking at the code, it appears that the lock cache used by LockImpl#checkLock
() is not updated/invalidated after the unlock operation modifies the
underlying information. In fact, it appears that entries in this cache are
never updated/invalidated after they are first entered, so there may be other
problems.
Commenting out use of the cache as follows works around the problem:
373,384c373,381
< // Removed all use of lock cache, since it is not invalidated
correctly. Results in the inability
< // to release another user's lock, even when you have the
appropriate permission.
<
< // Boolean locked = token.checkLockCache(object, action);
< // if (locked != null) {
< // if (locked.booleanValue()) {
< // throw new ObjectLockedException(object.getUri());
< // }
< // else {
< // return;
< // }
< // }
---
> Boolean locked = token.checkLockCache(object, action);
> if (locked != null) {
> if (locked.booleanValue()) {
> throw new ObjectLockedException(object.getUri());
> }
> else {
> return;
> }
> }
389c386
< // try {
---
> try {
391,396c388,393
< // token.cacheLock(object, action, false);
< // }
< // catch (ObjectLockedException e) {
< // token.cacheLock(object, action, true);
< // throw e;
< // }
---
> token.cacheLock(object, action, false);
> }
> catch (ObjectLockedException e) {
> token.cacheLock(object, action, true);
> throw e;
> }
Note that the line numbers here are not accurate.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org