Skip to content

Commit

Permalink
Writing nulls in cache should really be fine.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arantor committed Nov 5, 2018
1 parent 2cc878f commit f117c52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/StoryBB/Cache/File.php
Expand Up @@ -120,7 +120,7 @@ public function putData($key, $value, $ttl = null)
@unlink($cachedir . '/data_' . $key . '.php');
else
{
$cache_data = '<' . '?' . 'php if (!defined(\'STORYBB\')) die; if (' . (time() + $ttl) . ' < time()) $expired = true; else{$expired = false; $value = \'' . addcslashes($value, '\\\'') . '\';}' . '?' . '>';
$cache_data = '<' . '?' . 'php if (!defined(\'STORYBB\')) die; if (' . (time() + $ttl) . ' < time()) $expired = true; else{$expired = false; $value = \'' . addcslashes($value, "\0" . '\\\'') . '\';}' . '?' . '>';

// Write out the cache file, check that the cache write was successful; all the data must be written
// If it fails due to low diskspace, or other, remove the cache file
Expand Down

0 comments on commit f117c52

Please sign in to comment.