Document Locking security bug!

User A is Manager and has role [wStandard], user B is Author and also has role [wStandard], and can Create and Delete documents in ACL settings.

User A creates documents a in database (with document locking enabled and proper Master Lock Server set).

Document Authors field contains @Author (= User A) and the role [wStandard].

User B will be able to delete documents locked by User A, by pressing Delete and F9 in view!

Even documents open in editmode by user A are deleted.

User B can not Lock documents locked by user A, but is able to delete them - very strange…?

Can you reproduce this error?

Daniel Bjarsch

Subject: RE: Document Locking security bug!

I’m not sure why you consider this a security bug. User B is authorized to delete the document. They’re not being permitted to do anything they couldn’t normally do.

It could be argued that document locking should prevent a user from deleting a document that another user is editing. However, unlike editing, the deletion will not produce a save conflict document. If User B waited until User A was finished editing, so that there was no lock, and then deleted the document, the result would be the same – except that User A wouldn’t know that their work was about to be deleted. As it is, I expect User A would get some sort of message trying to save – document has been deleted? And they could then choose to create a new document and copy the contents into it, if they chose.

Of course, you could argue that User B might choose not to delete the document if they knew User A was still working on it. However, if User B is going around deleting documents that people are still working on, then there may be a problem with your processes. User B ought better to be able to tell which documents are still in use – otherwise they may well be deleting other documents that, although they are not being edited at that moment, are still valuable and would be missed.

I suppose you could write a QueryDocumentDelete event to test whether a locked document was about to be deleted, but I’m not convinced this is more desirable than the current situation.

You might also have an indication in the view which documents are currently locked.

Subject: RE: Document Locking security bug!

Indeed. Document Locking is a way to prevent Save Conflicts. It’s not security. Previously there was no way to tell when another user was editing a document.

Subject: The point is…

My point is the inconsistent behaviour when you can not delete a document (unlocked) in a view, unless you first lock it via the Actions menu or rightclicking the document.

In the case I describe in the main post you can delete the document right away, without any notice that it is already locked by another user. The document then appeares again when User A saves it, which might come as a surprise for User B, dont you think?

It is as if the lock by User A, counts also for User B, when it comes to deleting documents.

To me it would be absolutely obvious that a document locking system would not allow a document to be deleted, as long as it is locked by another user…

I still considered this a bug or a poor implementation of the locking system

Subject: RE: The point is…

Ah. Now that you’ve clarified, I think I can agree that it makes little sense to require users to lock documents before deletion, only if they’re not already locked by another user. I still don’t think it’s a security bug, but it seems inconsistent.

It doesn’t appear that there is already an SPR for this; I myself don’t have time to try to reproduce it (not my area) but there is an established bug-reporting procedure that you can use, as described in the forum FAQs.

Subject: Thank you!

…I though I was going nuts :slight_smile:

I agree I was not clear in my first post (maybe blinded by frustration :wink:

I will go further with this issue, as you suggest - maybe on the LotuSphere we can get som answers…

If so I will post here if anyone is interested…

Regards

/Daniel

Subject: RE: The point is…

To me it would be absolutely obvious that a document locking system would not allow a document to be deleted, as long as it is locked by another user…

I still considered this a bug or a poor implementation of the locking system

But others would disagree, and at least Notes allows you to modify this behaviour if you don’t like it.

So, a bug? No way.

A poorly-implemented feature in your opinion? Yes.

Subject: RE: The point is…

OK, maybe its just my opinion… :slight_smile:

But can you give an argument why and when this would be the desired behaviour?

Why do you have to lock an unlocked document before deletion at all, when you can delete it right away if someone else is working on it?

How do you explain to your users when to delete the ‘correct’ way (by rightclicking and locking it first), and when to just hit Delete / F9?

Why not display “Document is locked…” in both cases?

Or let us delete directly in the view by Delete/F9 wether the document is locked or not!

Maybe this is not a big issue in most cases, but it does bring us supportcases and is confusing to our users…

Regardsless if this is a bug, or good or bad, please comment!

Subject: SPR Created… Document Locking bug!

SPR is now created on this issue. Fix will be available in upcoming release…

SPR ID is SDEY5WNLPD

Subject: QueryDocumentDelete

Could you not just write a QueryDocumentDelete event that disallows deletion if the document is locked?

Subject: RE: QueryDocumentDelete

Thank you for your suggestion - I have done that already, to give my user the functionality that should be expected…

Regards

Daniel Bjarsch