Alexandre Alapetite
224b20edd1
Merge upstream SimplePie PR details ( #3614 )
...
https://github.com/simplepie/simplepie/pull/681
https://github.com/simplepie/simplepie/pull/680
https://github.com/simplepie/simplepie/pull/675
3 years ago
Alexandre Alapetite
d0d5f1ce3f
Merge SimplePie changes ( #3588 )
...
Related to https://github.com/simplepie/simplepie/pull/676
from https://github.com/FreshRSS/FreshRSS/pull/1087
4 years ago
Alexandre Alapetite
a57fa9975a
Fix wrong SimplePie type hint ( #3578 )
...
`SimplePie_Cache` also exists but is something else.
4 years ago
Alexandre Alapetite
150015079f
SimplePie fix old regression during manual merge ( #3568 )
...
Bug from https://github.com/FreshRSS/FreshRSS/pull/2136
Related upstream PR https://github.com/simplepie/simplepie/pull/676
4 years ago
Alexandre Alapetite
eeff1a17b0
Suport standard HTTP 410 Gone ( #3561 )
...
When a feed returns an HTTP 410 Gone, mute the corresponding feed, i.e. stop refreshing it.
Example of such feed, Les Décodeurs (Libération) https://rss.liberation.fr/rss/100893/
4 years ago
Alexandre Alapetite
0ff6ba4542
SimplePie fix PHP8 uncatched error ( #3547 )
...
#fix https://github.com/FreshRSS/FreshRSS/pull/3546
When `loadHTML()` is given a null or empty string.
```
PHP Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /var/www/freshrss/lib/SimplePie/SimplePie/Locator.php:83
```
4 years ago
Alexandre Alapetite
b7fdfbb894
SimplePie prevent cache pollution ( #3502 )
...
* SimplePie prevent cache polution
#fix https://github.com/FreshRSS/FreshRSS/pull/3367#issuecomment-766250249
#fix https://github.com/FreshRSS/FreshRSS/pull/3494#issuecomment-790113663
* Fix bug
* Minor improvement
* Update cache filename in FreshRSS (1/2)
* cacheFilename temp
* New SimplePie get_cache_filename()
* Fix typos
* Update lib/SimplePie/SimplePie.php
Typo
* Include user-agent and timeout
* fix array_merge
* Declaration
* force_feed was lost in a commit
4 years ago
Alexandre Alapetite
75711c3647
Manual update to SimplePie 1.5.6 ( #3469 )
...
* Manual update to SimplePie 1.5.6
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/3206 (1.5.5)
Differences
692e8bc19b...155cfcfacd
Related to https://github.com/FreshRSS/FreshRSS/pull/3416 ,
https://github.com/FreshRSS/FreshRSS/pull/3404
* Typo
4 years ago
Kiblyn11
0e6ad01dbf
Fix: handle very big feed ( #3416 )
...
* fix: handle big xml files which cause out of memory exceptions by working with chunks in cleanMd5 function (because of preg_replace) and parse (because of xml_parse)
* Review
* Fixes in error handling (case of the last call to xml_parse, case of
error during fopen, break in case of XML error...)
* Takes advantage of the chunking for computing the cache hash
* Larger chunks of 1MB
Co-authored-by: e <bokes74743@tjuln.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
4 years ago
Alexandre Alapetite
23c43b1fbf
Fix return type for broken feeds ( #3423 )
...
Fix a rare error when an invalid feed is forced to be added again.
FreshRSS code (not upstream)
4 years ago
Alexandre Alapetite
45ee7a36d5
PHP8: SimplePie wrong use of isset ( #3404 )
...
#fix https://github.com/FreshRSS/FreshRSS/issues/3401 (crash with PHP 8+)
`ceil()` crashes in PHP8+ in case of invalid input such as empty string.
`intval()` fixes the problem with almost identical behaviour than `ceil()` in PHP7- (except for floating point values)
#fix FreshRSS/FreshRSS#3401 (crash with PHP 8+)
Example with feed http://podcast.hr2.de/derTag/podcast.xml
```xml
<enclosure url="https://mp3podcasthr-a.akamaihd.net:443/mp3/podcast/derTag/derTag_20210129_87093232.mp3 "
length="" type="audio/mpeg"/>
```
`isset("")` passes and then `ceil("")` crashes due to wrong type in PHP8+:
```
Uncaught TypeError: ceil(): Argument #1 ($num) must be of type
int|float, string given in ./SimplePie/SimplePie/Item.php:2871
```
Upstream patch https://github.com/simplepie/simplepie/pull/670
4 years ago
Alexandre Alapetite
8ec2b257df
Update SimplePie (PHP8) ( #3206 )
...
Contributes to https://github.com/FreshRSS/FreshRSS/issues/3082
Includes https://github.com/FreshRSS/FreshRSS/pull/3180
Differences:
aaad78e6da...692e8bc19b
4 years ago
Alexandre Alapetite
1c0e7b4feb
SimplePie: Fix HTTP 301 permanent redirection ( #3180 )
...
* SimplePie: Fix HTTP 301 permanent redirection
When adding feeds it worked fine, but detecting permanent redirects for
existing feeds was sometimes broken (only when PHP open_basedir was not
set).
Indeed, using the built-in CURLOPT_FOLLOWLOCATION instead of the manual
method in SimplePie hides the list of HTTP redirects along the way, and
prevents the distinction of e.g. 301 vs. 302 redirects.
This patch disables CURLOPT_FOLLOWLOCATION in SimplePie, and fixes the
manual method at the same time.
The use of CURLOPT_FOLLOWLOCATION was nevertheless not systematic (only
when open_basedir was not set), so now there is only one logic
independent of open_basedir.
I will send a PR upstream to SimplePie.
How to test: pick a feed with 301 redirection such as HTTP to HTTPS,
e.g. http://ing.dk/rss/term/341
Manually change back to previous address (to simulate a feed that is
changing address)
Refresh feed and observe whether the 301 redirect is obeyed.
* Wrong blank
4 years ago
Alexandre Alapetite
9997acd611
Minor SimplePie merge ( #2870 )
...
https://github.com/FreshRSS/FreshRSS/pull/2852 was merged upstream
https://github.com/simplepie/simplepie/pull/643
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2814
5 years ago
Alexandre Alapetite
e424f45b8c
SimplePie use distint cache for force_feed ( #2852 )
...
#fix https://github.com/FreshRSS/FreshRSS/issues/2524
In general, we should avoid using the same cache for feeds that are fetched with distinct parameters / settings..
PR upstream to SimplePie https://github.com/simplepie/simplepie/pull/643
5 years ago
Alexandre Alapetite
9716071918
SimplePie 1.5.4 ( #2814 )
...
https://github.com/simplepie/simplepie/compare/1.5.3..a72e1dfafe7870affdae3edf0d9a494e4fa31bc6
Follow up of the update to 1.5.3
https://github.com/FreshRSS/FreshRSS/pull/2702
Requires PHP 5.6+
https://github.com/FreshRSS/FreshRSS/pull/2527#issuecomment-592952451
5 years ago
Craig Andrews
ecd00854be
Manual update to SimplePie 1.5.3 ( #2702 )
5 years ago
Alexandre Alapetite
0fb21e1473
SimplePie 604 ( #2350 )
...
Cherry-pick https://github.com/simplepie/simplepie/pull/604
6 years ago
Alexandre Alapetite
c9e46dce86
Manual update to SimplePie 1.5.2 ( #2136 )
6 years ago
Alexandre Alapetite
7ab4a2609a
Support for media: tags ( #1920 )
...
* Support for media: tags
https://github.com/FreshRSS/FreshRSS/issues/944
E.g. YouTube
* Fix for medium attribute
* Changelog 944
https://github.com/FreshRSS/FreshRSS/issues/944
https://github.com/FreshRSS/FreshRSS/pull/1920
* enclosure styling
* Compatibility old enclosure content
6 years ago
Alexandre Alapetite
4c8f147238
Suppress XML error during conversion attempt ( #1909 )
...
Using LIBXML_NOERROR. Seems to be necessary for newer PHP versions
because the at sign does not suppress warnings. In a FreshRSS-specific
SimplePie section.
Warning: DOMDocument::loadXML(): Namespace prefix media on content is
not defined in Entity, line: 42 in
/..../FreshRSS/lib/SimplePie/SimplePie/Parser.php on line 144
6 years ago
Alexandre Alapetite
c96b5ff34a
SimplePie fix for Atom feeds using namespace for type ( #1893 )
...
https://github.com/FreshRSS/FreshRSS/issues/1892
6 years ago
Alexandre Alapetite
f17417e95c
Strip credentials from HTTP Referer ( #1891 )
...
0edf390187/library/SimplePie/File.php (L109)
Candidate for pull-request upstream to SimplePie
6 years ago
Alexandre Alapetite
dd65cb0f9c
Manual merge upstream SimplePie
7 years ago
Jonas Östanbäck
e825822ba0
Add syslog_enabled in one more file create call
8 years ago
Jonas Östanbäck
d6bd90a801
Add syslog_enabled when creating new simplepie_file
8 years ago
Alexandre Alapetite
cc235c6af3
SimplePie light manual update
8 years ago
Alexandre Alapetite
0a3ab899a0
Add support for UTF-8 BOM in SimplePie feed_or_html()
...
https://github.com/FreshRSS/FreshRSS/issues/1336
8 years ago
Alexandre Alapetite
a37484fd2f
Fix SimplePie autodiscovery for text/xml HTML pages
...
https://github.com/FreshRSS/FreshRSS/issues/1264
8 years ago
Alexandre Alapetite
531f6ada99
SimplePie better message
8 years ago
Alexandre Alapetite
ccecebc2b4
SimplePie error message XML PCRE
...
https://github.com/FreshRSS/FreshRSS/issues/1227
8 years ago
Alexandre Alapetite
8ae96d000a
SimplePie trim
...
https://github.com/FreshRSS/FreshRSS/issues/1142
9 years ago
Alexandre Alapetite
9e2e5fd594
SimplePie force HTTPS simplifie code
...
https://github.com/FreshRSS/FreshRSS/issues/1083
https://github.com/FreshRSS/FreshRSS/pull/1087
9 years ago
Alexandre Alapetite
c1de11f17d
SimplePie force HTTPS bug with sub-domains
...
https://github.com/FreshRSS/FreshRSS/issues/1083
9 years ago
Alexandre Alapetite
0eef625b6d
SimplePie force HTTPS for enclosures
...
https://github.com/FreshRSS/FreshRSS/issues/1083
https://github.com/FreshRSS/FreshRSS/pull/1087
9 years ago
Alexandre Alapetite
685c0ad2f8
SimplePie HTTPS updated comments
...
https://github.com/FreshRSS/FreshRSS/issues/1083
9 years ago
Alexandre Alapetite
d344da59fd
HTTPS search tree: simplify code
...
https://github.com/FreshRSS/FreshRSS/issues/1083
9 years ago
Alexandre Alapetite
9711f02db7
SimplePie Force HTTPS custom list domains
...
Load from data/force-https.default.txt and data/force-https.txt
Efficient tree structure to search the domains
https://github.com/FreshRSS/FreshRSS/pull/1087
9 years ago
Alexandre Alapetite
9d4a445758
Work in progress HTTPS
9 years ago
Alexandre Alapetite
0f870e800b
Avoid prototol-relative URLs
...
Protocol-relative URLs do not seem to work well with API / mobile apps
9 years ago
Alexandre Alapetite
74ef8d9b15
SimplePie force HTTPS, another approach
...
https://github.com/FreshRSS/FreshRSS/issues/1083
9 years ago
Alexandre Alapetite
4a9a7404bc
Syntax error
9 years ago
Alexandre Alapetite
bd0facbb73
HTTPS SimplePie experiment
...
Syntax bug
https://github.com/FreshRSS/FreshRSS/issues/1083
9 years ago
Alexandre Alapetite
83e58d3759
Experiment with forcing HTTPS for selected embed providers
...
YouTube, DailyMotion, Tumblr
https://github.com/FreshRSS/FreshRSS/issues/1083
9 years ago
Alexandre Alapetite
fa432755cc
Implement cURL options
...
https://github.com/FreshRSS/FreshRSS/issues/897
Requires that https://github.com/FreshRSS/FreshRSS/pull/898 is merged
first.
9 years ago
Alexandre Alapetite
cb114a341b
Merge some pull requests from upstream
...
silent Warning cast with PHP 5.3.3 (RHEL-6)
https://github.com/simplepie/simplepie/pull/258
Use rss:pubDate over atom:updated when determining the posting date
https://github.com/simplepie/simplepie/pull/288
Update Item.php: add support for media thumbnails
https://github.com/simplepie/simplepie/pull/340
Remove PHP Notices https://github.com/simplepie/simplepie/pull/353
And removed "FreshRSS" annotations for pull requests submitted upstream
Fixed a typo in Date.php (wrong number for September)
https://github.com/simplepie/simplepie/pull/374
Remove duplicate case https://github.com/simplepie/simplepie/pull/406
Added set_curl_options method to allow custom options
https://github.com/simplepie/simplepie/pull/407
Improved error message https://github.com/simplepie/simplepie/pull/412
9 years ago
Alexandre Alapetite
2bfc4dbf8b
SimplePie forgot static keyword
...
https://github.com/FreshRSS/FreshRSS/issues/711
10 years ago
Alexandre Alapetite
7735471140
SimplePie faster regex for sanitizing URLs
...
Can simplify the regex (faster because anchored) for cleaning URLs based
on the fact that we only have to deal with HTTP or HTTPS
https://github.com/FreshRSS/FreshRSS/pull/715
10 years ago
Alexandre Alapetite
0ed213d97f
Revert "SimplePie seems to only supports HTTP schemes"
...
This reverts commit 1c38e646c3
.
10 years ago
Alexandre Alapetite
1c38e646c3
SimplePie seems to only supports HTTP schemes
...
Can simplify the regex (faster because anchored) for cleaning URLs based
on the fact that we only have to deal with HTTP or HTTPS
10 years ago