aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2022-01-30Fix ctype_alnum (#4182)Gravatar Alexandre Alapetite
* Fix ctype_alnum #fix https://github.com/FreshRSS/FreshRSS/issues/4180 Ensure `ctype_alnum()` gets a string * Changelog
2022-01-17fix: Ignore non-PHP files in migrations/ folder (#4163)Gravatar berumuron
Some NAS create folders named `@eaDir` in the FreshRSS tree, including the `migrations/` folder. This broke the migration system which expected only valid PHP files to be present in this folder. Now, it ignores non-PHP files. Reference: https://github.com/FreshRSS/FreshRSS/issues/4044
2022-01-09Fix PHP 7.4 signature warnings (#4140)Gravatar Alexandre Alapetite
Revert some type hints creating warnings in PHP 7.4 (not in PHP 7.0 nor PHP 8.1)
2022-01-09Add spell checking with typos (#4138)Gravatar Alexandre Alapetite
* Add spell checking with typos Implement https://github.com/FreshRSS/FreshRSS/pull/4134#issuecomment-1008027558 * GitHub Actions attempt * Quiet wget * Makefile
2022-01-08Fix various typos and spelling errors in documentation, comments and code. ↵Gravatar Thomas Renes
(#4134)
2022-01-07Optimise Minz_ModelPdo::class (#4119)Gravatar Luc SANCHEZ
* - Fix typo, - remove unnecessary null in property, - remove unused property, - add phpDoc, - add ext PDO in composer.json, - use strict comparison, - indentation * Translate * Update lib/Minz/ModelPdo.php Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> * The code is more explicite * Fix phpstan * Fix phpstan expect one * Fix phpstan * Return in back... * make fix-all * Fix exception and more types * Fix more types * Remove ext- in composer.json Co-authored-by: Luc SANCHEZ <l.sanchez-ext@ubitransport.com> Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-01-06Fix several PHP8.1 warnings (#4123)Gravatar Alexandre Alapetite
* Fix several PHP8.1 warnings Taking advantage of https://github.com/FreshRSS/FreshRSS/pull/4121 * Couple oh type hints missing * Compatibility PHP 7 * Fix variadic PHPDocs syntax
2022-01-05[CI] PHPCS: check for opening brace on same line (#4122)Gravatar Frans de Jonge
* [CI] PHPCS: check for opening brace on same line * make fix-all * Minor comments Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-01-04PHPStan level 5 (#4110)Gravatar Alexandre Alapetite
* Fix most PHPDocs errors Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 https://phpstan.org/writing-php-code/phpdoc-types * Avoid func_get_args Use variadic syntax instead https://php.net/manual/functions.arguments#functions.variable-arg-list And avoid dynamic functions names when possible to more easily identify calls and unused functions. Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 * PHPStan level 3 * PHPStand level 4 * Update default to PHPStan level 4 * Towards level 5 * Fix level 4 regression * Towards level 5 * Pass PHPStan level 5 * Towards level 6 * Remove erronenous regression from changelog https://github.com/FreshRSS/FreshRSS/pull/4116
2022-01-02SimplePie 1.5.8 manual upgrade (#4113)Gravatar Alexandre Alapetite
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/4011 Instead of https://github.com/FreshRSS/FreshRSS/pull/4102 * https://github.com/simplepie/simplepie/commit/bea5de77afc274dc7c36cac39cdf53de346a5b50 * https://github.com/simplepie/simplepie/commit/5aab77e105d4384c9bb1a747010f380c0506f7a2 * https://github.com/simplepie/simplepie/commit/76be63e72ea6867d9982bf9bd97ba706b196d602
2022-01-01Avoid func_get_args (#4108)Gravatar Alexandre Alapetite
Use variadic syntax instead https://php.net/manual/functions.arguments#functions.variable-arg-list And avoid dynamic functions names when possible to more easily identify calls and unused functions. Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103
2022-01-01Fix most PHPDocs errors (#4107)Gravatar Alexandre Alapetite
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 https://phpstan.org/writing-php-code/phpdoc-types
2021-12-31Add PHPStan (#4021)Gravatar Alexandre Alapetite
* Add PHPStan #fix https://github.com/FreshRSS/FreshRSS/issues/4016 https://phpstan.org/ ```sh composer run-script phpstan ``` * More fixes * Fix global variables * Add .phtml * Fix merge https://github.com/FreshRSS/FreshRSS/pull/4090 * Fix more warnings * Fix view errors and enable in CI * ReturnTypeWillChange * Dynamic view type * Fix Minz static/self bug
2021-12-31Fix extensions_enabled (#4090)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/4088
2021-12-02Minz request avoid custom methods (#4020)Gravatar Alexandre Alapetite
Take advantage of PHP7+ null-coalescing operator `??` to make code more standard, shorter, and faster instead of custom function with no extra functionality. Allows code to be better tested and fix two PHPstan errors: ``` ------ ----------------------------------------- Line app/Controllers/configureController.php ------ ----------------------------------------- 410 Cannot unset offset 'rid' on string. ------ ----------------------------------------- ------ ------------------------------------ Line lib/Minz/FrontController.php ------ ------------------------------------ 70 Cannot unset offset 'c' on string. 71 Cannot unset offset 'a' on string. ------ ------------------------------------ ``` https://github.com/FreshRSS/FreshRSS/issues/4016
2021-12-01Fix some PHP 8.1 warnings (#4012)Gravatar Alexandre Alapetite
* Fix some PHP 8.1 warnings The proper fix will have to wait till be drop PHP7. #fix https://github.com/FreshRSS/FreshRSS/issues/4010 * Another PHP8.1 fix
2021-12-01Manual update SimplePie (#4011)Gravatar Alexandre Alapetite
* https://github.com/simplepie/simplepie/commit/417a1661b2610448bd8e1835d6d4160a0aff9a97 * https://github.com/simplepie/simplepie/commit/ebdd0643ee927edfcaf40bfd27ab23ce9c975120 * https://github.com/simplepie/simplepie/commit/941412027a46979b4f1d29e53edf91829788d781 * https://github.com/simplepie/simplepie/commit/f58a23730f01f26bbcfe02ff9266e337c241be88
2021-11-14Update PHPMailer to 6.5.1 (#3977)Gravatar Brooke
2021-10-24Fix getNonStandardShortcuts (#3924)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3922 Quick fix. The `getNonStandardShortcuts()` could probably be re-written.
2021-09-11Mailer rename .txt to .txt.php (#3842)Gravatar Alexandre Alapetite
* Mailer rename .txt to .txt.php
2021-07-11Add system configuration for extension (#3626)Gravatar Alexis Degrugillier
Before, only the user configuration was supported by extensions. But it was limiting if one has to create a system extension with configuration. Now, both user and system configuration are supported.
2021-05-18Add a request method to extract arrays (#3629)Gravatar Alexis Degrugillier
2021-05-16Minz provide action name in controller exception (#3624)Gravatar Alexandre Alapetite
Contributes to https://github.com/FreshRSS/FreshRSS/issues/3584
2021-05-15git update auto change to edge branch (#3589)Gravatar Alexandre Alapetite
* git update auto change to edge branch For existing installations using automatic git update, checkout *edge* branch if it was still using *master* or *dev*. * One more prune * Fix several small issues * theirs does not work here * Use migration mechanism * Better handling of Migration errors * Test details * Fix tests * Do not use new migration system for now
2021-05-08Fix several comments syntaxes (#3615)Gravatar Alexandre Alapetite
Mainly wrong `@return` types in comments
2021-05-08Merge upstream SimplePie PR details (#3614)Gravatar Alexandre Alapetite
https://github.com/simplepie/simplepie/pull/681 https://github.com/simplepie/simplepie/pull/680 https://github.com/simplepie/simplepie/pull/675
2021-04-17Show start error (#3590)Gravatar Alexandre Alapetite
* Show start error #fix https://github.com/FreshRSS/FreshRSS/issues/3581 We were not showing the actual error for several types of exceptions, e.g. database connection error. Possible regression since https://github.com/FreshRSS/FreshRSS/pull/3407 * Try to make the error message less confusing
2021-04-17Merge SimplePie changes (#3588)Gravatar Alexandre Alapetite
Related to https://github.com/simplepie/simplepie/pull/676 from https://github.com/FreshRSS/FreshRSS/pull/1087
2021-04-08Fix wrong SimplePie type hint (#3578)Gravatar Alexandre Alapetite
`SimplePie_Cache` also exists but is something else.
2021-03-28SimplePie fix old regression during manual merge (#3568)Gravatar Alexandre Alapetite
Bug from https://github.com/FreshRSS/FreshRSS/pull/2136 Related upstream PR https://github.com/simplepie/simplepie/pull/676
2021-03-26tec: Remove data/do-install.txt (#3555)Gravatar berumuron
* Remove file data/do-install.txt This file was painful during update because we had to remember to delete it each time. It added a security issue by allowing an attacker to reinstall FreshRSS during the update process. The (more powerful) file data/applied_migrations.txt has been introduced in 8619cf6fa to replace do-install.txt. We had to wait for at least one release in order to make sure existing instances of FreshRSS created the migration file. It should be ok now. * Replace i18n install.not_deleted key * Update documentation to update FreshRSS
2021-03-26Suport standard HTTP 410 Gone (#3561)Gravatar Alexandre Alapetite
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/
2021-03-23SimplePie fix PHP8 uncatched error (#3547)Gravatar Alexandre Alapetite
#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 ```
2021-03-21Remove shortcut validation (#3548)Gravatar Alexis Degrugillier
Before, only standard shortcuts were supported. When other shortcuts were configured, they were filtered out. Now, those shortcuts are stored in the configuration and an alert message is displayed to alert the user that he is using non-standard shortcuts. See #3481
2021-03-09SimplePie prevent cache pollution (#3502)Gravatar Alexandre Alapetite
* 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
2021-02-28Travis: Enforce phpcs line length + whitespace (#3488)Gravatar Alexandre Alapetite
* Update Travis line length * Also check whitespace in CSS files * Fix line length ext.php * More syntax, string templates * Fix exclude-pattern * Test JS files as well
2021-02-26Add support for extension user files (#3433)Gravatar Alexis Degrugillier
Extension user files can be stored easily in the user folder instead of the static folder.
2021-02-24Upgrade PHPMailer to 6.3.0 (#3457)Gravatar Brooke
* Upgrade PHPMailer to 6.2.0 * Bump PHPMailer to 6.3.0 Co-authored-by: berumuron <dev@marienfressinaud.fr>
2021-02-20Manual update to SimplePie 1.5.6 (#3469)Gravatar Alexandre Alapetite
* Manual update to SimplePie 1.5.6 Follow-up of https://github.com/FreshRSS/FreshRSS/pull/3206 (1.5.5) Differences https://github.com/simplepie/simplepie/compare/692e8bc19bc4aca20b57474cca2a1d234ce89d63...155cfcfacdbf7ee4e9cbb837e70564cdd6a40ac0 Related to https://github.com/FreshRSS/FreshRSS/pull/3416 , https://github.com/FreshRSS/FreshRSS/pull/3404 * Typo
2021-02-17Fix: handle very big feed (#3416)Gravatar Kiblyn11
* 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>
2021-02-17Add user maintenance hooks (#3440)Gravatar Alexis Degrugillier
The new hook allows to add maintenance extensions at the user level. See #3398
2021-02-11Remove Minz validation (#3439)Gravatar Alexis Degrugillier
It should have been done during #3302.
2021-02-11refactor: remove referer checks, as they are no longer needed (replaced by ↵Gravatar hesch
csrf tokens) (#3432)
2021-02-08Fix configuration local cache (#3431)Gravatar Alexis Degrugillier
Before, setting values did not refresh the configuration cache. Thus generating some weird behavior when configuring extensions. Now, the cache is updated with the most recent values when the configuration is modified.
2021-02-06API implement OPML import/export (#3424)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3421
2021-02-06Fix heredoc syntax (#3426)Gravatar Alexandre Alapetite
Fix regression from https://github.com/FreshRSS/FreshRSS/pull/3407 Identifier must not be indented PHP 5.6.36 (cli) (built: Apr 28 2018 21:14:51) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies PHP Parse error: syntax error, unexpected end of file in lib/lib_rss.php on line 608 Errors parsing lib/lib_rss.php
2021-02-06Fix return type for broken feeds (#3423)Gravatar Alexandre Alapetite
Fix a rare error when an invalid feed is forced to be added again. FreshRSS code (not upstream)
2021-02-05Add requirements check in CLI (#3410)Gravatar Alexandre Alapetite
* Add requirements check in CLI #fix https://github.com/FreshRSS/FreshRSS/issues/1853 * More checks #fix https://github.com/FreshRSS/FreshRSS/issues/1853
2021-02-05Better error message on failure (#3407)Gravatar Martin
* bump default logout from 30 to 365 days * * Change cookie duration to constant * Change cookie duration to three months * use class * use 90 days (otherwise login form says 91.3 days) * change class * also this works now * Better error message * inconsistent dot with the other message * Better error message * add errorMessage() * fix style * html escape the error title * also html escape error message * remove spaces before parentheses * rework the error message * Minz-friendly * Update message Do not advise running this script as wrong user * Update lib/lib_rss.php Co-authored-by: Martin <spleefer90@gmail.com> Co-authored-by: Martin Rys <martin@rys.pw> Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-02-05Add a method to retrieve a configuration value (#3422)Gravatar Alexis Degrugillier
This will simplify extension code by removing a lot of logic from the extension itself when it's not needed. I've tested it on one of my extension with all the other recent extension modifications and I could remove half of the code needed before.