Commit Graph

79 Commits

Author SHA1 Message Date
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
2020-10-03 15:18:44 +02:00
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
2020-09-17 10:35:56 +02:00
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
2020-04-01 22:42:32 +02:00
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
2020-03-28 20:24:31 +01:00
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
2020-02-29 22:29:52 +01:00
Craig Andrews
ecd00854be Manual update to SimplePie 1.5.3 (#2702) 2019-12-06 18:10:06 +01:00
Alexandre Alapetite
0fb21e1473 SimplePie 604 (#2350)
Cherry-pick https://github.com/simplepie/simplepie/pull/604
2019-04-06 15:51:00 +02:00
Alexandre Alapetite
c9e46dce86 Manual update to SimplePie 1.5.2 (#2136) 2018-11-18 11:36:35 +01:00
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
2018-06-06 21:29:22 +02:00
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
2018-05-31 19:22:02 +02:00
Alexandre Alapetite
c96b5ff34a SimplePie fix for Atom feeds using namespace for type (#1893)
https://github.com/FreshRSS/FreshRSS/issues/1892
2018-05-22 08:49:11 +02:00
Alexandre Alapetite
f17417e95c Strip credentials from HTTP Referer (#1891)
0edf390187/library/SimplePie/File.php (L109)
Candidate for pull-request upstream to SimplePie
2018-05-20 23:23:48 +02:00
Alexandre Alapetite
dd65cb0f9c Manual merge upstream SimplePie 2017-05-28 02:02:21 +02:00
Jonas Östanbäck
e825822ba0 Add syslog_enabled in one more file create call 2017-05-09 19:16:57 +02:00
Jonas Östanbäck
d6bd90a801 Add syslog_enabled when creating new simplepie_file 2017-05-09 17:55:01 +02:00
Alexandre Alapetite
cc235c6af3 SimplePie light manual update 2017-03-26 15:02:35 +02:00
Alexandre Alapetite
0a3ab899a0 Add support for UTF-8 BOM in SimplePie feed_or_html()
https://github.com/FreshRSS/FreshRSS/issues/1336
2016-10-20 23:10:15 +02:00
Alexandre Alapetite
a37484fd2f Fix SimplePie autodiscovery for text/xml HTML pages
https://github.com/FreshRSS/FreshRSS/issues/1264
2016-09-25 15:55:28 +02:00
Alexandre Alapetite
531f6ada99 SimplePie better message 2016-08-28 16:37:35 +02:00
Alexandre Alapetite
ccecebc2b4 SimplePie error message XML PCRE
https://github.com/FreshRSS/FreshRSS/issues/1227
2016-08-28 16:35:54 +02:00
Alexandre Alapetite
8ae96d000a SimplePie trim
https://github.com/FreshRSS/FreshRSS/issues/1142
2016-04-30 23:53:23 +02:00
Alexandre Alapetite
9e2e5fd594 SimplePie force HTTPS simplifie code
https://github.com/FreshRSS/FreshRSS/issues/1083
https://github.com/FreshRSS/FreshRSS/pull/1087
2016-03-01 19:48:52 +01:00
Alexandre Alapetite
c1de11f17d SimplePie force HTTPS bug with sub-domains
https://github.com/FreshRSS/FreshRSS/issues/1083
2016-03-01 19:14:26 +01:00
Alexandre Alapetite
0eef625b6d SimplePie force HTTPS for enclosures
https://github.com/FreshRSS/FreshRSS/issues/1083
https://github.com/FreshRSS/FreshRSS/pull/1087
2016-02-29 20:38:21 +01:00
Alexandre Alapetite
685c0ad2f8 SimplePie HTTPS updated comments
https://github.com/FreshRSS/FreshRSS/issues/1083
2016-02-29 17:20:23 +01:00
Alexandre Alapetite
d344da59fd HTTPS search tree: simplify code
https://github.com/FreshRSS/FreshRSS/issues/1083
2016-02-29 17:09:44 +01:00
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
2016-02-28 21:34:54 +01:00
Alexandre Alapetite
9d4a445758 Work in progress HTTPS 2016-02-24 21:08:24 +01:00
Alexandre Alapetite
1f7647f4df Merge branch 'HTTPS_Everywhere' of https://github.com/Alkarex/FreshRSS into HTTPS_Everywhere 2016-02-22 20:18:53 +01:00
Alexandre Alapetite
0f870e800b Avoid prototol-relative URLs
Protocol-relative URLs do not seem to work well with API / mobile apps
2016-02-22 20:18:11 +01:00
Alexandre Alapetite
74ef8d9b15 SimplePie force HTTPS, another approach
https://github.com/FreshRSS/FreshRSS/issues/1083
2016-02-22 08:51:02 +01:00
Alexandre Alapetite
4a9a7404bc Syntax error 2016-02-21 22:45:54 +01:00
Alexandre Alapetite
bd0facbb73 HTTPS SimplePie experiment
Syntax bug
https://github.com/FreshRSS/FreshRSS/issues/1083
2016-02-21 22:42:30 +01:00
Alexandre Alapetite
83e58d3759 Experiment with forcing HTTPS for selected embed providers
YouTube, DailyMotion, Tumblr
https://github.com/FreshRSS/FreshRSS/issues/1083
2016-02-21 22:19:07 +01:00
Marien Fressinaud
2c6bc849e0 Merge branch 'curlOptions' of https://github.com/Alkarex/FreshRSS into Alkarex-curlOptions 2015-07-12 15:53:40 +02:00
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.
2015-07-12 12:16:56 +02:00
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
2015-07-12 00:35:31 +02:00
Alexandre Alapetite
6032caad2f Merge remote-tracking branch 'origin/Logging' into dev 2015-03-24 21:58:21 +01:00
Alexandre Alapetite
2bfc4dbf8b SimplePie forgot static keyword
https://github.com/FreshRSS/FreshRSS/issues/711
2015-03-24 21:58:00 +01:00
Alexandre Alapetite
a5e960acbe Merge remote-tracking branch 'origin/Logging' into dev 2015-03-23 21:59:07 +01:00
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
2015-03-23 21:58:37 +01:00
Alexandre Alapetite
3aa15d95a8 Merge remote-tracking branch 'origin/Logging' into dev 2015-03-22 23:57:27 +01:00
Alexandre Alapetite
0ed213d97f Revert "SimplePie seems to only supports HTTP schemes"
This reverts commit 1c38e646c3.
2015-03-22 23:56:47 +01:00
Alexandre Alapetite
c83d30db64 Merge remote-tracking branch 'origin/Logging' into dev 2015-03-22 23:54:21 +01:00
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
2015-03-22 23:53:59 +01:00
Alexandre Alapetite
b628fb107d Merge remote-tracking branch 'origin/Logging' into dev 2015-03-22 22:54:56 +01:00
Alexandre Alapetite
ad9fe52f5a SimplePie sanitize URLs for syslog
https://github.com/FreshRSS/FreshRSS/issues/711
https://github.com/FreshRSS/FreshRSS/pull/715
2015-03-22 22:54:29 +01:00
Alexandre Alapetite
92621345f9 Merge remote-tracking branch 'origin/Logging' into dev 2015-03-21 18:21:21 +01:00
Alexandre Alapetite
1a35e2271d SimplePie option to restaure syslog of HTTP requests
https://github.com/FreshRSS/FreshRSS/issues/711
2015-03-21 18:20:36 +01:00
Alexandre Alapetite
0e08b5ba56 htmlspecialchars_decode for all SIMPLEPIE_CONSTRUCT_MAYBE_HTML
https://github.com/FreshRSS/FreshRSS/issues/754
2015-03-21 15:13:08 +01:00