From f96547dedc545c7b1a9cff396d7a7a6e3eae781c Mon Sep 17 00:00:00 2001 From: "Theodore R. Smith" Date: Fri, 27 Jun 2014 16:39:17 -0400 Subject: [PATCH] Fixed htmlpurifier destroying ACLs on directory creation --- library/HTMLPurifier/DefinitionCache/Serializer.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/HTMLPurifier/DefinitionCache/Serializer.php b/library/HTMLPurifier/DefinitionCache/Serializer.php index ecacb88f..ae6d5aee 100644 --- a/library/HTMLPurifier/DefinitionCache/Serializer.php +++ b/library/HTMLPurifier/DefinitionCache/Serializer.php @@ -219,9 +219,11 @@ class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCac } elseif (!$this->_testPermissions($base, $chmod)) { return false; } - $old = umask(0000); - mkdir($directory, $chmod); - umask($old); + // Fix for "chmod destroys ACL bug #32 + // https://github.com/ezyang/htmlpurifier/issues/32 + //$old = umask(0000); + mkdir($director); + //umask($old); } elseif (!$this->_testPermissions($directory, $chmod)) { return false; }