diff options
| author | 2022-03-22 23:12:22 +0100 | |
|---|---|---|
| committer | 2022-03-22 23:12:22 +0100 | |
| commit | b0a63355b66d0cc431c9b1af96622c2360207565 (patch) | |
| tree | 24bf04d71f7ecba33f807a0e4d4b8f5ae7c92dcf /app/Models/Feed.php | |
| parent | 7d00ad8ed75cae5dafd4ac1f2cc6e15e94333628 (diff) | |
SimplePie fix parsing of HTTP Links (#4283)
* SimplePie fix parsing of HTTP Links
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link
* https://datatracker.ietf.org/doc/html/rfc8288
Before, SimplePie was not able to parse something like
```
Link: <https://pubsubhubbub.appspot.com>; rel="hub", <https://pubsubhubbub.superfeedr.com>; rel=hub, <https://websubhub.com/hub>; rel="hub"
```
Diffstat (limited to 'app/Models/Feed.php')
| -rw-r--r-- | app/Models/Feed.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php index baaf448f8..f43237b00 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -352,9 +352,15 @@ class FreshRSS_Feed extends Minz_Model { } $links = $simplePie->get_links('self'); - $this->selfUrl = $links[0] ?? ''; + $this->selfUrl = empty($links[0]) ? '' : checkUrl($links[0]); + if ($this->selfUrl == false) { + $this->selfUrl = ''; + } $links = $simplePie->get_links('hub'); - $this->hubUrl = $links[0] ?? ''; + $this->hubUrl = empty($links[0]) ? '' : checkUrl($links[0]); + if ($this->hubUrl == false) { + $this->hubUrl = ''; + } if ($loadDetails) { // si on a utilisé l’auto-discover, notre url va avoir changé |
