Commit Graph

106 Commits

Author SHA1 Message Date
Alexandre Alapetite
c523f5a4e7 Relaxed to allow underscore _ in URL hostnames (#3133)
* Relaxed to allow underscore _ in URL hostnames

#fix https://github.com/FreshRSS/FreshRSS/issues/3132
https://bugs.php.net/bug.php?id=64948

* Minor fix in favicons redirect

* Minor fix in relative HREF for favicons
2020-07-31 16:33:45 +02:00
Alexandre Alapetite
3f9518b377 Hide feed credentials when adding a new feed (#3099)
Avoid showing HTTP Basic Auth credentials in feed error log and in feed
title (when there is no title provided)
2020-07-07 10:54:28 +02:00
Alexandre Alapetite
83b5944dcb Stream instead of memory copy of SimplePie entries (#2972)
* Stream instead of memory copy of SimplePie entries

https://github.com/FreshRSS/FreshRSS/issues/2952

* Undo lines delete

* Typo

* Remove unaccessible code

https://github.com/FreshRSS/FreshRSS/pull/2972/files#r425624163

* Back-compatibility for Feed->entries

https://github.com/FreshRSS/FreshRSS/pull/2972/files#r425631913
2020-05-17 00:04:51 +02:00
Alexandre Alapetite
aea3806590 Attempt to reduce max memory usage during actualize (#2955)
* Attempt to reduce max memory usage during actualize

#Fix https://github.com/FreshRSS/FreshRSS/issues/2952

* Use memory_get_peak_usage
2020-05-10 21:34:12 +02:00
Alexandre Alapetite
b1aac20839 Fever integer type for numbers (#2946)
* Fever integer type for feed ID

#Fix
https://github.com/FreshRSS/FreshRSS/issues/2940#issuecomment-623022435

* Fix feed_id

* Ensure string for entry ID

To be compatible with 32-bit platforms.
Before, the type was inconsistent depending on architecture + database

* Integer for entry count functions
2020-05-03 13:39:16 +02:00
Alexandre Alapetite
83ba09c2a5 Fever integer type for last_refreshed_on_time 2 (#2945)
#Fix fever_last_refreshed_on_time
Try again https://github.com/FreshRSS/FreshRSS/pull/2944
2020-05-02 23:55:10 +02:00
Alexandre Alapetite
dba40e5870 WebSub move fixes (#2922)
Small fixes related to when WebSub changes address:
* When unsubscribing, one must use the current/old address, not the
newly found selfUrl;
* This change
https://github.com/FreshRSS/FreshRSS/pull/2659#discussion_r347263068 was
wrong, so reverted to the first version. We must obey the rules also for
feeds for which the initial WebSub enabling is not finished, otherwise
we never have a chance to redirect the feed to the proper selfUrl.
2020-04-24 16:29:19 +02:00
Alexandre Alapetite
bdc4da6ad0 Expose podcast in API (#2898)
* Expose podcast in API

Expose RSS enclosures in our API, e.g. for clients supporting podcasts

* PHP CS?

* Annoying linter

* Light optimisation
2020-04-16 18:11:26 +02:00
Alexandre Alapetite
925319653d No pre for enclosure-description (#2808)
* No pre for enclosure-description

#fix https://github.com/FreshRSS/FreshRSS/issues/2807
In browsers, the styling `white-space:pre-line` will be applied by CSS,
but no styling will be done for clients via API.

* Corresponding CSS change
2020-02-29 15:58:31 +01:00
Alexandre Alapetite
2aff347b2e Fix wrong getHeader refactoring (#2749)
* Fix wrong getHeader refactoring

Fix regression introduced by
https://github.com/FreshRSS/FreshRSS/pull/2373
The refactoring required a call to init() even for static functions,
which is most of the time not done.
Removed premature abstraction of `$_SERVER`, which was the root cause of
the bug.
https://github.com/FreshRSS/FreshRSS/issues/2748#issuecomment-569898931

* Refactoring: Move serverIsPublic to Minz_Request

* Add mitigations for wrong configurations

Due to the regression, we have some existing configurations with a bad
base_url

* Forgot one instance
2020-01-04 23:35:42 +01:00
Alexis Degrugillier
cc0db9af4f Feature/new archiving (#2335)
* Change archiving config page layout

I've changed some wording and moved actions into a
maintenance section.

* Update purge action

Now we have more control on the purge action. The configuration allows
us to choose what to keep and what to discard in a more precise way.
At the moment, the configuration applies for all feeds.

* Add purge configuration on feed level

Now the extend purge configuration is available on feed level.
It is stored as attributes and will be used in the purge action.

* Update purge action

Now the purge action uses the feed configuration if it exists and
defaults on user configuration if not.

* Add empty option in period list

* Fix configuration warnings

* Add archiving configuration on categories

See #2369

* Add user info back

* Add explanations in UI

* Fixes for SQLite + error + misc.

* Fix invalid feed reference

* Short array syntax

Only for new code, so far

* Fix prefix error

* Query performance, default values

Work in progress

* Fix default values and confirm before leaving

Form cancel and confirm changes before leaving were broken.
And start taking advantage of the short echo syntax `<?= ?>` as we have
moved to PHP 5.4+

* More work

* Tuning SQL

* Fix MariaDB + performance issue

* SQL performance

* Fix SQLite bug

* Fix some attributes JSON encoding bugs

Especially for SQLite export/import

* More uniform, fix bugs

More uniform between global, category, feed settings

* Drop special cases for old articles during refresh

Instead will use lastSeen date with the new archiving logic.
This was generating problems anyway
https://github.com/FreshRSS/FreshRSS/issues/2154

* Draft drop index keep_history

Not needed anymore

* MySQL typo

Now properly tested with MySQL, PostgreSQL, SQLite

* More work for legacy values

Important to avoid overriding user's preference and risking deleting
data erroneously

* Fix PHP 7.3 / 7.4 warnings

@aledeg "Trying to use values of type null, bool, int, float or resource
as an array (such as $null["key"]) will now generate a notice. "
https://php.net/migration74.incompatible

* Reintroduce min articles and take care of legacy parameters

* A few changes forgotten

* Draft of migration + DROP of feed.keep_history

* Fix several errors

And give up using const for SQL to allow multiple database types (and we
cannot redefine a const)

* Add keep_min to categories + factorise archiving logic

* Legacy fix

* Fix bug yield from

* Minor: Use JSON_UNESCAPED_SLASHE for attributes

And make more uniform

* Fix sign and missing variable

* Fine tune the logic
2019-10-23 00:52:15 +02:00
Alexandre Alapetite
e3e5954394 PDO refactoring for code simplification (#2522)
* PDO refactor

* Automatic prefix when using the syntax `_tableName`
* Uniformity: MySQL is now PDO::ATTR_EMULATE_PREPARES = false just like SQLite and PostgreSQL, with consequences such as only one statement per query
* Use PDO methods exec(), query(), prepare() + execute() in a more efficient way
* Remove auto-update SQL code for versions older than FreshRSS 1.5 (3 years old)
* The name of the default category is set in PHP instead of in the DB (simplies SQL and allows changing the name according to the FreshRSS language)
* Rename `->bd` to `->pdo` (less of a frenshism, and more informative)
* Fix some requests, which were not compatible with MySQL prepared statements

* Whitespace

* Fix syntax for PostgreSQL sequences

+ MySQL install

* Minor formatting

* Fix lastInsertId for PostgreSQL

* Use PHP 5.6+ const

Take advantage of https://github.com/FreshRSS/FreshRSS/pull/2527
https://www.php.net/manual/en/migration56.new-features.php

* A bit of forgotten PHP 5.6 simplification for cURL

* Forgotten $s

* Mini fix custom user config

https://github.com/FreshRSS/FreshRSS/pull/2490/files#r326290346

* More work on install.php but not finished

* install.php working

* More cleaning of PDO in install

* Even more simplification

Take advantage of PDO->exec() to run multiple statements

* Disallow changing the name of the default category

https://github.com/FreshRSS/FreshRSS/pull/2522#discussion_r326967724
2019-09-29 16:22:50 +02:00
Alexandre Alapetite
1804c0e0bc Filter actions (#2275)
* Draft of filter actions

* Travis

* Implement UI + finish logic

* Travis
2019-03-23 22:52:47 +01:00
Alexandre Alapetite
512d047f02 Update naming to WebSub (#2184)
Instead of PubSubHubbub / PuSH
2018-12-16 17:02:03 +01:00
Alexandre Alapetite
6122a45d9a Minor additional WebSub debug 2018-11-15 17:07:05 +01:00
Alexandre Alapetite
0fce9892ff API encoding tuning (#2120)
Use only minimal XML->Unicode encoding for articles title.
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2093
2018-11-12 09:03:20 +01:00
Alexandre Alapetite
b672fc190d Tweaks for Vienna RSS (#2093)
* Tweaks for Vienna RSS

https://github.com/FreshRSS/FreshRSS/issues/2091
https://github.com/ViennaRSS/vienna-rss/issues/1197

* Fix get feed by URL

* Fix get item ids returning starred elements

* API add item ids by feed URL

* Add API filter `it`

https://feedhq.readthedocs.io/en/latest/api/reference.html#stream-items-ids

* API add `nt=` filter + refactoring

* No ; prefix for author

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435562495

* Add id long form prefix and accept short id form

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435631259

* Fix quote problem

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435683930

* Isolate bug fix for News+

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435687041

* Rework encoding conventions

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-437441834

* Unicode escaping alternative

Alternative approach to encode XML special characters and other
problematic characters into their Unicode fullwidth version when we
cannot use HTML-encoding because clients disagree wether they should
HTML-decode or not.
https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-436059559
2018-11-11 17:31:50 +01:00
Alexandre Alapetite
0aecf44294 Option to force clear cache (#2052)
https://github.com/FreshRSS/FreshRSS/issues/1020#issuecomment-428515868
2018-10-17 18:03:50 +02:00
Alexandre Alapetite
b323ed0846 Improve authors (#2025)
* Links for authors and multiple authors

Favour ';' as a separator instead of ',' to better cope with
multi-author scientific articles.
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/1997 ,
https://github.com/FreshRSS/FreshRSS/issues/1968,
https://github.com/FreshRSS/FreshRSS/pull/2023

* Change i18n authors

* Update layout

* Unicode-compatible search

Example for `author:Loïc`

* author <em> styling

* Final details

* Minor spacing
2018-09-16 10:46:27 +02:00
Alexandre Alapetite
af27b6d300 Tags split improvement (#2023)
* Tags split improvement

Some feeds use a single category with comma-separated tags.
Better handling of tags containing a space

* Handle spaces in searches with +

Can now search in tags containing spaces

* Fix searches with spaces for title and author
2018-09-15 13:06:29 +02:00
Alexandre Alapetite
14e1b23e42 Allow multiple authors (#1997)
Fix https://github.com/FreshRSS/FreshRSS/issues/1968
2018-09-02 13:36:46 +02:00
Alexandre Alapetite
99dfdbc10d Avoid feed credentials in logs (#1949)
* Avoid feed credentials in logs

Related to https://github.com/FreshRSS/FreshRSS/pull/1891

* Changelog 1949
2018-07-08 11:29:05 +02:00
Alexandre Alapetite
eb3cca60dd Fix get_thumbnails null exception (#1933) 2018-06-12 12:35:52 +02:00
Alexandre Alapetite
6a56894e94 New extension event + Tumblr GDPR (#1924)
* New extension event + Tumblr GDPR

https://github.com/FreshRSS/FreshRSS/issues/1894
simplepie_before_init event

* Refactor extension enabling + Tumblr GDPR enabled by default

Add possibility for extensions to be enabled by default, and disabled
back by users.

* Minor whitespace
2018-06-09 15:58:18 +02: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
afad1d11af Fix type exception in loadCompleteContent (#1918)
* Fix type exception in loadCompleteContent

https://github.com/FreshRSS/FreshRSS/issues/1917
With some refactoring

* Changelog 1917

https://github.com/FreshRSS/FreshRSS/issues/1917
https://github.com/FreshRSS/FreshRSS/pull/1918
2018-06-05 13:48:34 +02:00
Alexandre Alapetite
6881d362b1 Detection of non-unique GUIDs (#1887)
* Detection of non-unique GUIDs

Some feeds are using GUIDs, but fail to make them unique.
Example: https://www.kbh-sprogcenter.dk/en/category/danish-break/feed/
This patch detects non-unique GUIDs, and disable GUIDs in that specific
case.

* Add state and log
2018-05-20 12:17:08 +02:00
ColonelMoutarde
a8ffde6263 add visibility "public" (#1849) 2018-05-19 13:16:51 +02:00
Alexandre Alapetite
b552abb332 JSON column for feeds (#1838)
* Draft of JSON column for feeds
https://github.com/FreshRSS/FreshRSS/issues/1654

* Add some per-feed options
  * Feed cURL timeout
  * Mark updated articles as read https://github.com/FreshRSS/FreshRSS/issues/891
  * Mark as read upon reception https://github.com/FreshRSS/FreshRSS/issues/1702
  * Ignore SSL (unsafe) https://github.com/FreshRSS/FreshRSS/issues/1811

* Try PHPCS workaround
While waiting for a better syntax support
2018-05-01 17:02:11 +02:00
perrinjerome
0c066cb428 Feed parsing: use author email when there's no author name (#1801)
This is especially useful because when author is given as
`<author>Author Name</author>` ( as in this example
https://cyber.harvard.edu/rss/rss.html#ltauthorgtSubelementOfLtitemgt ),
SimplePie will expose *Author Name* as `email`.
2018-02-28 20:08:32 +01:00
Alexis Degrugillier
7642d334f8 Replace "keep history" magic value by a constant (#1759)
I think the use of a magic value repeated many times in the code is prone to have some errors made by people not knowing its meaning. Using a constant is a bit more safe. Judging by some comments in the code, I am not the only one.
2018-01-02 23:53:35 +01:00
Alexis Degrugillier
8c2113f9e6 Add mute strategy configuration (#1750) 2018-01-01 20:34:06 +01:00
Alexandre Alapetite
e399bc4b92 Remove warning for CURLOPT_FOLLOWLOCATION with open_basedir (#1734)
For PHP 5.6.0- http://www.php.net/ChangeLog-5.php#5.6.0
https://bugs.php.net/bug.php?id=65646
https://github.com/FreshRSS/FreshRSS/pull/1733
https://github.com/FreshRSS/FreshRSS/pull/1657
https://github.com/FreshRSS/FreshRSS/issues/1655
2017-12-17 20:14:20 +01:00
Alexandre Alapetite
b1c317a253 Log rotation, use Minz_Log, new log constants
ADMIN_LOG, API_LOG, PSHB_LOG
2017-12-10 21:58:24 +01:00
Alexandre Alapetite
1eb19409b5 CURLOPT_FOLLOWLOCATION open_basedir bug (#1657)
CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set
https://github.com/FreshRSS/FreshRSS/issues/1655#issuecomment-334999448
https://stackoverflow.com/questions/6918623/curlopt-followlocation-cannot-be-activated
2017-10-08 17:26:43 +02:00
Alexandre Alapetite
4058ff3ff4 Remove SimplePie name from HTTP User-Agent string
https://github.com/FreshRSS/FreshRSS/issues/1622#issuecomment-334928486
https://github.com/FreshRSS/FreshRSS/issues/1627
https://github.com/FreshRSS/FreshRSS/issues/1607
2017-10-07 13:51:45 +02:00
Alexandre Alapetite
62d68f8c66 Quick fix PSHB encoding after Travis refactoring
https://github.com/FreshRSS/FreshRSS/pull/1619
Related to https://github.com/FreshRSS/FreshRSS/pull/1633
2017-09-24 12:16:41 +02:00
Alexandre Alapetite
2e8d8834c4 Quick fix small bug from 1619 (#1633)
https://github.com/FreshRSS/FreshRSS/pull/1619
2017-09-22 13:05:42 +02:00
Frans de Jonge
4e174ed9dd [ci] Add Travis (#1619)
* [ci] Add Travis

* Exclude some libs

* Semi-auto whitespace fixes

* line length in SQLite

* Exclude tests from line length

* Feed.php line length

* Feed.php: get rid of unnecessary concat

* Feed.php: line length

* bootstrap.php: no newline at end of file

* Allow concatenating across multiple lines

* Add Travis badge

* do-install line length

* update-or-create-user line length

* cli/create-user line length

* tests/app/Models/SearchTest.php fix indentation

* tests/app/Models/UserQueryTest.php fix indentation

* tests/app/Models/CategoryTest.php fix indentation

* [fix] PHP 5.3 on precise

* cli/do-install no spaces

* cli/list-users line length

* cli/reconfigure line length

* empty catch statements

* api/index line length nonsense

* spaces before semicolon

* app/Models/EntryDAO bunch of indentation

* extra blank lines

* spaces before comma in function call

* testing tabwidth

* increase to 10

* comment out tabwidth line

* try older phpcs version 3.0.0RC4

* line length exception for app/install.php

* proper spaces

* stray spaces in i18n

* Minz/ModelPdo line length

* Minz whitespace

* greader line length

* greader elseif placement

* app/Models/Feed.php spacing in function argument

* ignore php 5.3

* app/Models/ConfigurationSetter.php stray whitespace

* EntryDAOSQLite line length

* I vote for higher max line length =P

* ignore SQL

* remove classname complaint

* line length/more legible SQL

* ignore line length nonsense

* greader line length

* feedController issues

* uppercase TRUE, FALSE, NULL

* revert

* importExportController lowercase null

* Share.php default value not necessary because ! is_array () a few lines down

* CategoryDAO constants should be UPPERCASE

* EntryDAO reduce line length

* contentious autofix

* Allow failures on all versions of PHP except 7.1 because reasons
2017-09-22 12:13:46 +02:00
Alexandre Alapetite
18285d2729 Author HTML to text
https://github.com/FreshRSS/FreshRSS/issues/1590#issuecomment-313914174
https://github.com/FreshRSS/FreshRSS/pull/1592#issuecomment-320290049
2017-08-19 13:48:47 +02:00
Alexandre Alapetite
97fe573ace SimplePie: Do not generate hash instead of GUID
https://github.com/FreshRSS/FreshRSS/issues/1552
2017-05-28 02:02:58 +02:00
Alexandre Alapetite
77e698617d Fix download regression
https://github.com/FreshRSS/FreshRSS/issues/1236#issuecomment-299732610
2017-05-07 22:38:29 +02:00
Alexandre Alapetite
e9e6fc3483 Download icon 💾 for other MIME types
https://github.com/FreshRSS/FreshRSS/issues/1236#issuecomment-299627105
2017-05-07 17:00:46 +02:00
Alexandre Alapetite
535aa35ba7 PSHB better unsubscribe
Cases when a user is deleted, or when a feed is deleted.
Removed random key do reduce the risk of subscribing several times to
the same PSHB feed.
2017-04-10 19:09:21 +02:00
Alexandre Alapetite
271a1fdc89 Missing checkUsername and const patten
https://github.com/FreshRSS/FreshRSS/pull/1423

https://github.com/YunoHost-Apps/freshrss_ynh/issues/27#issuecomment-279792363
2017-02-25 12:39:08 +01:00
Alexandre Alapetite
e1f214e9e2 CLI list-users and create-user
https://github.com/FreshRSS/FreshRSS/issues/1095
https://github.com/FreshRSS/FreshRSS/issues/1090
2016-10-22 12:58:06 +02:00
Alexandre Alapetite
8a923aa8c7 Finalize cron refresh favicons 2016-10-12 21:36:00 +02:00
Alexandre Alapetite
e8d1a6dcc9 Cron refresh favicons
Related to
https://github.com/FreshRSS/FreshRSS/issues/1181
https://github.com/FreshRSS/FreshRSS/issues/1298
2016-10-12 15:47:04 +02:00
Alexandre Alapetite
6bc37cef47 W3C resource-priorities have been abandonned
https://github.com/FreshRSS/FreshRSS/issues/1222
2016-10-08 21:45:47 +02:00
Alexandre Alapetite
05cabe99ae Take better advantage of other users refresh 2016-10-05 00:39:54 +02:00