U4-5133 - Lock issue in Access.IsProtected

Created by Stephan 24 Jun 2014, 10:20:09 Updated by Shannon Deminick 26 Jun 2017, 05:39:42

In umbraco.cms.businesslogic.web.Access, method IsProtected() calls IsProtectedInternal() within a read-lock but IsProtectedInternal does something like

if (CheckedPages.ContainsKey(DocumentId) == false) CheckedPages.Add(DocumentId, isProtected);

Which is prone to a race condition. Have witnessed exceptions being thrown by the hash table because of duplicate entries. Shouldn't we use a write-lock?

Comments

Stephan 24 Jun 2014, 10:21:17

Assigning to Shannon who modified the code with c309e18f13e9579dbd2baef1ff2ca4633bda19e0 in march.


Shannon Deminick 26 Jun 2017, 05:39:42

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/


Priority: Normal

Type: Bug

State: Closed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.2.1, 7.1.4

Due in version:

Sprint:

Story Points:

Cycle: