diff options
author | rxu <rxu@mail.ru> | 2015-05-04 16:51:09 +0700 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2015-05-04 16:53:27 +0700 |
commit | 0d2c8b5961d461913557795e8d99c0fa0be87448 (patch) | |
tree | 0914423f0593c7202bb73f778881944731b0adf0 /phpBB/phpbb/filesystem | |
parent | 6870293a9e197236f5a669a814011edf5741c20b (diff) | |
download | forums-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
Diffstat (limited to 'phpBB/phpbb/filesystem')
-rw-r--r-- | phpBB/phpbb/filesystem/filesystem.php | 2 |
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)) { |