aboutsummaryrefslogtreecommitdiff
path: root/app/Models
AgeCommit message (Collapse)Author
2026-01-24Message for closed registration (#8462)Gravatar rupak
* Add closed msg field i18n fix * Display based on registration type * Save as FreshRSS_Context::systemConf()->closed_registration_message instead * Improve messages * Revert unrelated changes * make fix-all * Minor whitespace * Simplify logic * Fix invalid use of empty() and sympler syntax --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-01-24MariaDB restrict USE INDEX (#8460)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/8455 Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8211
2026-01-10Fix MySQL transliterator_transliterate fallback (#8427)Gravatar Alexandre Alapetite
The string syntax of `strtr()` cannot handle mutibytes characters, so need to be rewritten using an array map approach. Extend the fallback replacements to include the Windows/ISO charsets of the latin languages for which we have a translation
2026-01-10Fix tags ILIKE (#8425)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/8424 Regression from https://github.com/FreshRSS/FreshRSS/issues/8329
2026-01-03Switch to using CURLOPT_ACCEPT_ENCODING instead of the deprecated ↵Gravatar Michael Meier
CURLOPT_ENCODING (#8376) * Replace deprecated CURLOPT_ENCODING The CURLOPT_ENCODING setting has been deprecated in favor of CURLOPT_ACCEPT_ENCODING. Signed-off-by: Michael Meier <mmeier1986@gmail.com> * Sync with our SimplePie fork PR https://github.com/FreshRSS/simplepie/pull/67 https://github.com/simplepie/simplepie/pull/960 https://github.com/simplepie/simplepie/pull/962 * Our SimplePie PR merged --------- Signed-off-by: Michael Meier <mmeier1986@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-01-03Merge commit from forkGravatar Bartłomiej Dmitruk
* Fix Path Traversal vulnerability in UserDAO methods * Add tests and changelog for UserDAO path traversal fix * make fix-all * Fix PHPStan --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-01-03Fix unwanted expansion of user queries in some cases (#8395)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/8378
2025-12-27Do not include hidden feeds when counting unread articles in categories (#8357)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/8347
2025-12-25DB: auto-add lastUserModified column also during markRead (#8346)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/8345
2025-12-24Fix serialisation of dates in searches (#8341)Gravatar Alexandre Alapetite
Dates should not be expanded/resolved in string serialisations of search expressions, as it otherwise break relative user queries such as `P30D`. Fix of https://github.com/FreshRSS/FreshRSS/pull/8293
2025-12-23Fix parsing of literal "or" in regex (#8338)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/7879
2025-12-21Improve configuration checks (#8334)Gravatar Alexandre Alapetite
Add a distinction between recommended and required extensions. Add check for recommended php-intl extension as follow-up of https://github.com/FreshRSS/FreshRSS/pull/8329#issuecomment-3677686581 Improve related checks such as ZIP. Reduce duplicated translations and tests.
2025-12-20More uniform SQL search and PHP search (#8329)Gravatar Alexandre Alapetite
* More uniform SQL search and PHP search The behaviour depends though on the database. Improve https://github.com/FreshRSS/FreshRSS/discussions/8265#discussioncomment-15278980 * Try to use transliterator_transliterate function instead
2025-12-17Use native PHP #[Deprecated] (#8325)Gravatar Alexandre Alapetite
https://php.watch/versions/8.4/Deprecated And enfore it with PHPUnit + PHPStan. Especially useful for extensions.
2025-12-17Rework encoding of search filters (#8324)Gravatar Alexandre Alapetite
Rework: * https://github.com/FreshRSS/FreshRSS/pull/8222 now that we have: * https://github.com/FreshRSS/FreshRSS/pull/8293 Follow-up of: * https://github.com/FreshRSS/FreshRSS/pull/8311 * More simplification * Deprecate getRawInput
2025-12-16Handle null in base64_encode (#8321)Gravatar Alexandre Alapetite
* Handle null in base64_encode https://github.com/FreshRSS/FreshRSS/discussions/8314#discussioncomment-15269370 * PHPDoc
2025-12-16Fix array unique gaps (#8322)Gravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/discussions/8265#discussioncomment-15270212
2025-12-15Reverse hash and nonce (#8320)Gravatar Alexandre Alapetite
Safer password evaluation
2025-12-13Fix search encoding and quoting (#8311)Gravatar Alexandre Alapetite
Revised the encoding approach for searches: the HTML encoding is done just before its use for DB search. Fix also some cases with wrong quoting. Fix https://github.com/FreshRSS/FreshRSS/pull/8306#issuecomment-3643865439 Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8293
2025-12-10Add functions to modify a search expression (#8293)Gravatar Alexandre Alapetite
* Allows easier modifications of the search expression. * Add proper `__toString()` instead of just returning the raw input string. Allows in particular showing the result of the actual parsing of the raw input string in the UI. Needed for https://github.com/FreshRSS/FreshRSS/pull/8294
2025-12-07Fix minor backslashes (#8292)Gravatar Alexandre Alapetite
2025-12-04Move unsafe autologin to an extension (#7958)Gravatar Inverle
Completes the following TODO https://github.com/FreshRSS/FreshRSS/issues/7923: https://github.com/FreshRSS/FreshRSS/blob/de624dc8ce63ec819c61216d9d44f828841c293e/app/Controllers/authController.php#L105 Extension PR: https://github.com/FreshRSS/Extensions/pull/364 https://github.com/FreshRSS/Extensions/tree/main/xExtension-UnsafeAutologin
2025-12-04Scaling of user statistics (#8277)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/8268 To better support user management on FreshRSS instance with many users. SQL speed improved. On a reduced test with 5 users, including some large accounts (PostgreSQL on a very tiny and slow server), improving from ~2.3s to ~1.8s, which gives ~20% speed improvement. Then tested with 1000 users, with only the default feed (on my old desktop computer): ```sh for i in {1..1000}; do ./cli/create-user.php --user=freshrss$i --password=freshrss; done app/actualize_script.php cli/access-permissions.sh ``` SQLite: ```console $ time cli/user-info.php | wc -l 1001 real 0m1.366s user 0m0.908s sys 0m0.475s ``` PostgreSQL: ```console $ time cli/user-info.php | wc -l 1001 real 0m28.498s user 0m12.137s sys 0m2.217s ``` MariaDB: ```console # time ./cli/user-info.php | wc -l 1001 real 0m49.485s user 0m1.276s sys 0m2.258s ``` Yes, SQLite is much faster - not a surprise for such use-cases, where the TCP connection is not re-used. I have added some CLI options to disable some statistics: ```sh cli/user-info.php --no-db-size --no-db-counts ``` For the Web UI, I have disabled detailed user statistics if it takes too long, and retrieve missing user statistics asynchronously via JavaScript. Lazy loading of the user details based on IntersectionObserver, with maximum 10 requests in parallel. Web UI tested on 1000 users as well. Checked with SeaMonkey.
2025-12-04Improve anonymous authentication logic (#8165)Gravatar Inverle
* Improve anonymous authentication logic * forgot to git add * Fix incorrect token check Because an empty parameter could be just passed if token for the user wasn't set: `&token=`
2025-12-03Fix MySQL / MariaDB database size calculation (#8282)Gravatar Alexandre Alapetite
The `_` is a special character in the SQL `LIKE` expression and was not escaped, leading to users counting for other users size. Stats for `freshrss` user included users `freshrss1` and `freshrss2` (but not vice versa). Discovered during https://github.com/FreshRSS/FreshRSS/pull/8277
2025-12-02Bump phpstan/phpstan from 2.1.31 to 2.1.32 (#8275)Gravatar dependabot[bot]
* Bump phpstan/phpstan from 2.1.31 to 2.1.32 --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-version: 2.1.32 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Ignore --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-11-30Web scraping support date format epoch milliseconds (#8266)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/discussions/8264 Auto detect whether a `U` date format should be in seconds or milliseconds.
2025-11-27Better merging of custom HTTP headers (#8251)Gravatar Alexandre Alapetite
Alternative to https://github.com/FreshRSS/FreshRSS/pull/8246 See https://github.com/FreshRSS/FreshRSS/issues/8189#issuecomment-3569434305
2025-11-26Fix MariaDB updateCachedValues (#8255)Gravatar Alexandre Alapetite
Changed syntax for an even wider compatibility. Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8254 Regression from https://github.com/FreshRSS/FreshRSS/pull/6957 MariaDB images on Docker Hub go back to 10.6, so changed documentation to indicate support from that version, as I cannot easily test even older versions.
2025-11-26Fix MariaDB for updates (#8254)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/8252 regression from https://github.com/FreshRSS/FreshRSS/pull/6957 The current code works with MySQL 8+ (as well as PostgreSQL and SQLite), but not with MariaDB, because MariaDB does not support CTE (Common Table Expression) fully (which I was not aware of)...
2025-11-17Change SQL update query (#6957)Gravatar Alexandre Alapetite
* Change SQL update query for MariaDB / MySQL fix https://github.com/FreshRSS/FreshRSS/issues/5707 * No change for SQLite * Fix merge error * Update MySQL version on the model of PostgreSQL Performance to be tested * Fix LEFT JOIN, also for PostgreSQL / SQLite * Fix alias * Reduce MySQL deadlock * Fix compatibility with SQLite * Back to identical SQL for all databases
2025-11-17Fix MySQL commitNewEntries (#8223)Gravatar Alexandre Alapetite
I just realised that `commitNewEntries()` was not sorting articles properly before insertion in database when using MySQL: Articles were not sorted by publication date as expected from the temporary table before insertion in the final table. MySQL was not picking the correct field, so fixed with an explicit alias. Discovered because I did some tests with MySQL in https://github.com/FreshRSS/FreshRSS/pull/6957 At the same time, I did the same change for PostgreSQL and SQLite although those were not affected.
2025-11-15force correct index for MySQL when listing entries (#8211)Gravatar Martin Hartmann
* force correct index for MySQL when listing entries * Make special case for MySQL / MariaDB --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-11-15SQL: Optimise speed of updateCachedValues() (#8207)Gravatar Alexandre Alapetite
For PostgreSQL and SQLite fix https://github.com/FreshRSS/FreshRSS/issues/8206
2025-11-11Housekeeping lib_rss.php (#8193)Gravatar Alexandre Alapetite
* Housekeeping lib_rss.php `lib_rss.php` had become much too large, especially after https://github.com/FreshRSS/FreshRSS/pull/7924 Moved most functions to other places. Mostly no change of code otherwise (see comments). * Extension: composer run-script phpstan-third-party
2025-11-04Better transitions between groups of articles (#8174)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/7520 fix https://github.com/FreshRSS/FreshRSS/issues/8168 fix https://github.com/FreshRSS/FreshRSS/discussions/8172
2025-11-04Create separate `Retry-After` files for proxies (#8029)Gravatar Inverle
* Create separate `Retry-After` files for proxies Bad proxies are able to send a false `Retry-After` header and affect the availability of feeds (domain-wide) for other users. This PR starts including the address of the proxy if present in filenames for `Retry-After` to mitigate the issue. * Reduce code changes * Sync SimplePie fork https://github.com/FreshRSS/simplepie/pull/62 --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-11-02[sqlite export] add username and timestamp (#8169)Gravatar scollovati
* [sqlite export] add username and timestamp add username and timestamp to sqlite user export, similar to the ZIP export. Useful for archiving purposes. * Fix case of backups and other DB types https://github.com/FreshRSS/FreshRSS/pull/8169#issuecomment-3476079108 --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-10-28Mark as read 1 or 7 days based on publication date (#8163)Gravatar Alexandre Alapetite
Allow the UI for marking as read articles older than 1 or 7 days to also work when sorting by publication date (in which case, the publication date is used). <img width="382" height="229" alt="image" src="https://github.com/user-attachments/assets/a630dec8-1e18-4766-8392-59fb593dd73d" />
2025-10-26Fix DOM fatal error while filtering retrieved full content (#8161)Gravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/pull/8132 was not sufficient. Fix *PHP Fatal error: Uncaught Error: Couldn't fetch DOMElement. Node no longer exists*
2025-10-25Bump phpstan/phpstan from 2.1.29 to 2.1.31 (#8156)Gravatar dependabot[bot]
* Bump phpstan/phpstan from 2.1.29 to 2.1.31 Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan-phar-composer-source) from 2.1.29 to 2.1.31. - [Commits](https://github.com/phpstan/phpstan-phar-composer-source/commits) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-version: 2.1.31 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Fixes --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-10-24Better SQL auto-update f.kind (#8148)Gravatar Alexandre Alapetite
Add a little help to make sure that feed.kind gets added during the first call. Tested that replacing the DB with a backup from Febuary 2020 just works, automatically adding new columns since FreshRSS 1.20.0.
2025-10-22PostgreSQL: compatibility with PCRE word boundary (#8141)Gravatar Alexandre Alapetite
Allow the use of regex `\b` for word boundary (and `\B` for the opposite) even when using PostgreSQL. Follow up of: * https://github.com/FreshRSS/FreshRSS/pull/6706 For instance, `intitle:/\bnew\B/` will find *newest* but not *new* nor *renewal*. Useful in particular to minimise the differences between PHP and database in: * https://github.com/FreshRSS/FreshRSS/pull/7959
2025-10-21Add support for extension compatibility (#8081)Gravatar Alexis Degrugillier
The compatibility does support only a minimum version of FreshRSS. If we need something a bit more clever in the future, it is possible to handle a rule with a bit more complexity. See https://github.com/FreshRSS/FreshRSS/issues/5903 * Update app/Controllers/extensionController.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/i18n/pl/admin.php Co-authored-by: Inverle <inverle@proton.me> * Minor move phpstan-type --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> Co-authored-by: Inverle <inverle@proton.me>
2025-10-17Fix DOM error while filtering retrieved full content (#8132)Gravatar Alexandre Alapetite
``` PHP Fatal error: Uncaught Error: Couldn't fetch DOMElement in app/Models/Entry.php:998 ```
2025-10-17GReader API frss:priority (#7583)Gravatar Alexandre Alapetite
* GReader API frss:priority Experiment with a FreshRSS namespace in the GReader API to see whether there is any interest. fix https://github.com/FreshRSS/FreshRSS/issues/1868 `'frss:priority'` can be: `'important'`, `'main'`, `'category'`, `'feed'` (there is also the value `hidden`, but which is filtered out and as such never sent through the API at the moment) * Add visibility feed https://github.com/FreshRSS/FreshRSS/pull/7972
2025-10-17Fix API list by IDs (#8130)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/8129 Regression from https://github.com/FreshRSS/FreshRSS/pull/7886
2025-10-16Sort by article length (#8119)Gravatar Alexandre Alapetite
* Sort by article length fix https://github.com/FreshRSS/Extensions/issues/378 Very basic using simply SQL `LENGTH()` function. <img width="492" height="217" alt="image" src="https://github.com/user-attachments/assets/7cf37303-76c8-4411-b8b1-075e81535b60" /> * Improve content length retrieval
2025-10-15Filter on last user modified (#8093)Gravatar Alexandre Alapetite
Example: `userdate:PT1H` to select only articles modified by user during the last hour Fix https://github.com/FreshRSS/FreshRSS/issues/4280#issuecomment-3393078024 Useful for instance to bulk mark as unread recently marked articles by error: 1. Click on the toggle button to show the read articles (making sure the toggle for the unread articles is off) 2. Sort by *User modified 9→1* 3. Filter by *user modified date*, for instance to the last 3 hours by typing `userdate:PT3H` 4. Click in the drop-down menu *Mark selection as unread* P.S.: I have added at the same time a bunch of unit tests for date-related logic
2025-10-15Implement search form (#8103)Gravatar Alexandre Alapetite
* Add UI for advanced search To help users with the seach operators. Obviously not as powerful as a manually-written search query. Lack in particular negation and logical *and* for now, but I might try to do something about it. <img width="939" height="1438" alt="image" src="https://github.com/user-attachments/assets/0bcad39b-eff3-4f44-876b-a2552af2af00" /> * Consistency: allow multiple user queries like S:1,2 * Fix user query and add tests