From 0d2c8b5961d461913557795e8d99c0fa0be87448 Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 4 May 2015 16:51:09 +0700 Subject: [PATCH] [ticket/13814] Prevent phpbb_is_writable() method from truncating files phpbb_is_writable() of filesystem class uses 'w' mode to fopen files which causes checked files to be truncated. Use the 'c' mode instead. PHPBB3-13814 --- phpBB/phpbb/filesystem/filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/filesystem/filesystem.php b/phpBB/phpbb/filesystem/filesystem.php index 370dff77e5..2112882d1d 100644 --- a/phpBB/phpbb/filesystem/filesystem.php +++ b/phpBB/phpbb/filesystem/filesystem.php @@ -613,7 +613,7 @@ class filesystem implements filesystem_interface } else { - $handle = @fopen($file, 'w'); + $handle = @fopen($file, 'c'); if (is_resource($handle)) {