SMF Development > Bug Reports
[4956] cache_put_data fails on / in key [SMF 2.0.2]
nend:
This is one of those bugs that could be prevented if a / is not in a key. On the other hand though, who is going to prevent mod creators from putting a / in a key?
Today I was troubleshooting why Aeva Media was not putting embed items in the cache. I looked over and over the code, trying to figure what gives. I then decided to dig deeper and opened up Load.php and inspected SMF's cache function. I still was there troubleshooting then I figured since Aeva uses the url as the key maybe there was some illegal characters in there that where not getting translated in the function. This is when I discovered the / was the problem.
I edited the code in Load.php in the cache area to translate the /. Sure enough after the edits the cache became alive.
I am using file based caching because my host does not have anything else available, so I am unsure if this affects any other cache mechanism.
*edit
Forgot to put version number
Affects
cache_put_data
cache_get_data
emanuele:
Thanks for the report nend.
Tracked: http://dev.simplemachines.org/mantis/view.php?id=4956
nend:
How's it going on this report?
First you have to make the keys safe from illegal characters and possibly without looking at the source right now, file name length.
Right now I just have a system that converts illegal characters in place, in no way optimized. I was on another board, the two developers there are crazy about optimization and they had some pretty good ideas, still IMHO ideas but interesting. So anything proposed yet?
IchBin™:
Any updates or news will be posted to the bug tracker as things are done.
nend:
One question, I know this post has gone a little stale but didn't want to start another one. This is off topic, but I wanted to post something today to some notes on this bug. I would post it here but it might be awkward because it is a reply to another note... Well enough babble on to the point.
How do I post notes to the bug tracker?
There has been times I wanted to post input about possible bug fixes or code suggestions and haven't been able to do so. I can't figure out how to log in to the thing. Maybe there isn't a real login and is restricted. I wish I can express my thoughts but sometimes it is a pain finding a post to the bug to contribute ideas so I just end up keeping the ideas to myself. :-\
Navigation
[0] Message Index
[#] Next page
Go to full version