autotitle: check for empty url, prevent heap ovverflow
This commit is contained in:
parent
0189b6841b
commit
eb4e27e3ba
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
|||
0.1.12:
|
||||
* Check for empty url, prevents heap overflow on some php installations
|
||||
|
||||
0.1.11:
|
||||
* Fixed Smarty3 API change issue
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class serendipity_event_autotitle extends serendipity_event
|
|||
$propbag->add('description', PLUGIN_EVENT_AUTOTITLE_DESC);
|
||||
$propbag->add('stackable', false);
|
||||
$propbag->add('author', 'Malte Paskuda');
|
||||
$propbag->add('version', '0.1.11');
|
||||
$propbag->add('version', '0.1.12');
|
||||
$propbag->add('requirements', array(
|
||||
'php' => '4.1.0'
|
||||
));
|
||||
|
@ -177,6 +177,9 @@ class serendipity_event_autotitle extends serendipity_event
|
|||
//grab the real url
|
||||
preg_match('|href="([^\"]*?)"|is', $link, $url);
|
||||
$url = $url[1];
|
||||
if (empty($url)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//prepare cache:
|
||||
$this->cache->_setFileName($url, $this->cache_group);
|
||||
|
|
Loading…
Reference in a new issue