aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2015-05-04 16:51:09 +0700
committerrxu <rxu@mail.ru>2015-05-04 16:53:27 +0700
commit0d2c8b5961d461913557795e8d99c0fa0be87448 (patch)
tree0914423f0593c7202bb73f778881944731b0adf0
parent6870293a9e197236f5a669a814011edf5741c20b (diff)
downloadforums-0d2c8b5961d461913557795e8d99c0fa0be87448.tar
forums-0d2c8b5961d461913557795e8d99c0fa0be87448.tar.gz
forums-0d2c8b5961d461913557795e8d99c0fa0be87448.tar.bz2
forums-0d2c8b5961d461913557795e8d99c0fa0be87448.tar.xz
forums-0d2c8b5961d461913557795e8d99c0fa0be87448.zip
[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
-rw-r--r--phpBB/phpbb/filesystem/filesystem.php2
1 files changed, 1 insertions, 1 deletions
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))
{