Przeglądaj źródła

Another check to ensure the main index.php doesn't get deleted when managing attachment directories (per #899)

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 11 lat temu
rodzic
commit
b07b7c40be
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      Sources/ManageAttachments.php

+ 1 - 1
Sources/ManageAttachments.php

@@ -2006,7 +2006,7 @@ function ManageAttachmentPaths()
 							$path = $boarddir . DIRECTORY_SEPARATOR . $path;
 						}
 
-						if (isset($doit))
+						if (isset($doit) && realpath($path) != realpath($boarddir))
 						{
 							unlink($path . '/.htaccess');
 							unlink($path . '/index.php');