404 requests filling view cache

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

404 requests filling view cache

lowpass
Cake 2.2.4 (Yeah, i know -- need to upgrade this site!)

I just noticed that the view cache dir has a bunch of files along the lines of:

s_2fabc_2fabc_2fabc_2f_24_7b_40print_28md5_28base64_decode_28mzywd2vic2nhbg_29_29_29_7d_2f.php

Looks like the work of script kiddies. However, I'm also seeing things like this:

articles_deep_denial_or_disinformation.php
articles_dee.php

The first is the correct name/path and the second one is incomplete. There are several examples of this. I dunno if it's a Cake issue or not but the latter really shouldn't be cached as it's a 404.

Is there some way to tell Cake *not* to cache these?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: 404 requests filling view cache

OJ Tibi - @ojtibi
How does your cache configuration look like?

On Wednesday, October 28, 2015 at 8:34:43 AM UTC+8, cricket wrote:
Cake 2.2.4 (Yeah, i know -- need to upgrade this site!)

I just noticed that the view cache dir has a bunch of files along the lines of:

s_2fabc_2fabc_2fabc_2f_24_7b_40print_28md5_28base64_decode_28mzywd2vic2nhbg_29_29_29_7d_2f.php

Looks like the work of script kiddies. However, I'm also seeing things like this:

articles_deep_denial_or_disinformation.php
articles_dee.php

The first is the correct name/path and the second one is incomplete. There are several examples of this. I dunno if it's a Cake issue or not but the latter really shouldn't be cached as it's a 404.

Is there some way to tell Cake *not* to cache these?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: 404 requests filling view cache

euromark
In reply to this post by lowpass
Yes, in 2.4+ there is a skipLog param:
http://book.cakephp.org/2.0/en/appendices/2-4-migration-guide.html#errorhandler

But I just log them to a different log file via custom handler:
See https://github.com/dereuromark/cakephp-tools/wiki/Included-fixes-and-migration-tweaks#bugfixes--useful-adjustments
and https://github.com/dereuromark/cakephp-tools/blob/master/src/Error/ErrorHandler.php .

Mark



Am Mittwoch, 28. Oktober 2015 01:34:43 UTC+1 schrieb cricket:
Cake 2.2.4 (Yeah, i know -- need to upgrade this site!)

I just noticed that the view cache dir has a bunch of files along the lines of:

s_2fabc_2fabc_2fabc_2f_24_7b_40print_28md5_28base64_decode_28mzywd2vic2nhbg_29_29_29_7d_2f.php

Looks like the work of script kiddies. However, I'm also seeing things like this:

articles_deep_denial_or_disinformation.php
articles_dee.php

The first is the correct name/path and the second one is incomplete. There are several examples of this. I dunno if it's a Cake issue or not but the latter really shouldn't be cached as it's a 404.

Is there some way to tell Cake *not* to cache these?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: 404 requests filling view cache

lowpass
@euromark This affects caching? The issue is that the bad requests are nonetheless being saved to the cache views dir.

@ojtibi Sorry, should have included that.

core.php:

Configure::write('Cache.disable', false);
Configure::write('Cache.check', true);

$engine = 'File';
if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
        $engine = 'Apc';
}

$duration = '+999 days';
if (Configure::read('debug') >= 1) {
        $duration = '+10 seconds';
}

Cache::config('_cake_core_', array(
        'engine' => $engine,
        'prefix' => 'cake_core_',
        'path' => CACHE . 'persistent' . DS,
        'serialize' => ($engine === 'File'),
        'duration' => $duration
));

Cache::config('_cake_model_', array(
        'engine' => $engine,
        'prefix' => 'cake_model_',
        'path' => CACHE . 'models' . DS,
        'serialize' => ($engine === 'File'),
        'duration' => $duration
));


bootstrap.php:
Cache::config('default', array('engine' => 'File'));

Just a simple site, nothing special, as you can see.

I'm wondering if it's less to do with cache config but in error handling. Something to tell Cake, "btw, don't cache this". But I'm not seeing anything like that.

On Wed, Oct 28, 2015 at 7:36 AM, euromark <[hidden email]> wrote:
Yes, in 2.4+ there is a skipLog param:

But I just log them to a different log file via custom handler:

Mark



Am Mittwoch, 28. Oktober 2015 01:34:43 UTC+1 schrieb cricket:
Cake 2.2.4 (Yeah, i know -- need to upgrade this site!)

I just noticed that the view cache dir has a bunch of files along the lines of:

s_2fabc_2fabc_2fabc_2f_24_7b_40print_28md5_28base64_decode_28mzywd2vic2nhbg_29_29_29_7d_2f.php

Looks like the work of script kiddies. However, I'm also seeing things like this:

articles_deep_denial_or_disinformation.php
articles_dee.php

The first is the correct name/path and the second one is incomplete. There are several examples of this. I dunno if it's a Cake issue or not but the latter really shouldn't be cached as it's a 404.

Is there some way to tell Cake *not* to cache these?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.