Update of picoFeed for bugfix
This commit is contained in:
parent
6aa0aaa724
commit
58227aa091
@ -22,7 +22,7 @@ Router\before(function($action) {
|
|||||||
|
|
||||||
if ($action !== 'login' && ! isset($_SESSION['user'])) {
|
if ($action !== 'login' && ! isset($_SESSION['user'])) {
|
||||||
|
|
||||||
PicoFarad\Response\redirect('?action=login');
|
Response\redirect('?action=login');
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\csp(array(
|
Response\csp(array(
|
||||||
|
17
miniflux/vendor/PicoFeed/Filter.php
vendored
17
miniflux/vendor/PicoFeed/Filter.php
vendored
@ -55,8 +55,11 @@ class Filter
|
|||||||
'http://',
|
'http://',
|
||||||
'https://',
|
'https://',
|
||||||
'ftp://',
|
'ftp://',
|
||||||
'mailto://',
|
'mailto:',
|
||||||
'//'
|
'//',
|
||||||
|
'data:image/png;base64,',
|
||||||
|
'data:image/gif;base64,',
|
||||||
|
'data:image/jpg;base64,'
|
||||||
);
|
);
|
||||||
|
|
||||||
public $protocol_attributes = array(
|
public $protocol_attributes = array(
|
||||||
@ -169,6 +172,14 @@ class Filter
|
|||||||
}
|
}
|
||||||
else if ($this->isAllowedProtocol($value) && ! $this->isBlacklistMedia($value)) {
|
else if ($this->isAllowedProtocol($value) && ! $this->isBlacklistMedia($value)) {
|
||||||
|
|
||||||
|
if ($attribute == 'src' &&
|
||||||
|
isset($attributes['data-src']) &&
|
||||||
|
$this->isAllowedProtocol($attributes['data-src']) &&
|
||||||
|
! $this->isBlacklistMedia($attributes['data-src'])) {
|
||||||
|
|
||||||
|
$value = $attributes['data-src'];
|
||||||
|
}
|
||||||
|
|
||||||
$attr_data .= ' '.$attribute.'="'.$value.'"';
|
$attr_data .= ' '.$attribute.'="'.$value.'"';
|
||||||
$used_attributes[] = $attribute;
|
$used_attributes[] = $attribute;
|
||||||
}
|
}
|
||||||
@ -264,6 +275,8 @@ class Filter
|
|||||||
|
|
||||||
public function isRelativePath($value)
|
public function isRelativePath($value)
|
||||||
{
|
{
|
||||||
|
if (strpos($value, 'data:') === 0) return false;
|
||||||
|
|
||||||
return strpos($value, '://') === false && strpos($value, '//') !== 0;
|
return strpos($value, '://') === false && strpos($value, '//') !== 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
19
miniflux/vendor/PicoFeed/Parsers/Rss20.php
vendored
19
miniflux/vendor/PicoFeed/Parsers/Rss20.php
vendored
@ -19,8 +19,25 @@ class Rss20 extends Parser
|
|||||||
|
|
||||||
$namespaces = $xml->getNamespaces(true);
|
$namespaces = $xml->getNamespaces(true);
|
||||||
|
|
||||||
|
if ($xml->channel->link->count() > 1) {
|
||||||
|
|
||||||
|
foreach ($xml->channel->link as $xml_link) {
|
||||||
|
|
||||||
|
$link = (string) $xml_link;
|
||||||
|
|
||||||
|
if ($link !== '') {
|
||||||
|
|
||||||
|
$this->url = (string) $link;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
$this->url = (string) $xml->channel->link;
|
||||||
|
}
|
||||||
|
|
||||||
$this->title = (string) $xml->channel->title;
|
$this->title = (string) $xml->channel->title;
|
||||||
$this->url = (string) $xml->channel->link;
|
|
||||||
$this->id = $this->url;
|
$this->id = $this->url;
|
||||||
$this->updated = isset($xml->channel->pubDate) ? (string) $xml->channel->pubDate : (string) $xml->channel->lastBuildDate;
|
$this->updated = isset($xml->channel->pubDate) ? (string) $xml->channel->pubDate : (string) $xml->channel->lastBuildDate;
|
||||||
$this->updated = $this->updated ? strtotime($this->updated) : time();
|
$this->updated = $this->updated ? strtotime($this->updated) : time();
|
||||||
|
Loading…
Reference in New Issue
Block a user