You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on tiny project and noticed, that caching seems not working. Cache file is created, but later not found anymore.
Looking at Fat-Free Core source I noticed, that in function set() slashes and backshashes will be stripped, but not in exists() and neither clear(). That can lead to bug, when $key contains slashes/backslashes.
The text was updated successfully, but these errors were encountered:
jyri78
changed the title
Bug: \Cache->exists() returns always bool(false) when DSN is folder
[Bug] \Cache->exists() returns always bool(false) when DSN is folder
Oct 24, 2023
I found the same thing happening on my local development environment. There are several places in the base.php file that use is_file or read and write methods where the incoming filename string to be checked should be passed to the fixslashes method first.
For the purposes of this specific issue, however, I've submitted a PR with just the cache get method being modified to filter the incoming key in the same way that it is being written via the set method. PR #369 .
I'm working on tiny project and noticed, that caching seems not working. Cache file is created, but later not found anymore.
Looking at Fat-Free Core source I noticed, that in function
set()
slashes and backshashes will be stripped, but not inexists()
and neitherclear()
. That can lead to bug, when$key
contains slashes/backslashes.The text was updated successfully, but these errors were encountered: