aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers
AgeCommit message (Collapse)Author
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-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-13New links in transitions and jump to next transition (#8294)Gravatar Alexandre Alapetite
Easier to explain graphically: <img width="408" height="266" alt="image" src="https://github.com/user-attachments/assets/0e3724a1-155b-4a87-89b3-cfe8a18cb100" /> The jump to next section ⏭ works when the sorting criterion is a date. Need https://github.com/FreshRSS/FreshRSS/pull/8293
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-11Fix htmlspecialchars for search (#8306)Gravatar Alexandre Alapetite
Regression from 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-04Fix HTML encoding in preview filters (alternative) (#8259)Gravatar Alexandre Alapetite
Alternative to https://github.com/FreshRSS/FreshRSS/pull/8222 Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8222 Co-authored-by: Inverle <inverle@proton.me>
2025-12-03Fix CLI user creation warning when language is not given (#8283)Gravatar Alexandre Alapetite
Discovered during https://github.com/FreshRSS/FreshRSS/pull/8277
2025-11-26Add `data:` to CSP in `subscriptionController` (#8253)Gravatar Inverle
Quick fix for https://github.com/FreshRSS/FreshRSS/issues/8250 Regression from https://github.com/FreshRSS/FreshRSS/pull/7646 It seems the CSP is too permissive on some pages though (`img-src *`), so should fix that too later
2025-11-20Catch lack of exec function for git update (#8228)Gravatar Alexandre Alapetite
2025-11-17Fix search form for regex (#8226)Gravatar Alexandre Alapetite
Wrongly quoted Cherry-picked from https://github.com/FreshRSS/FreshRSS/pull/8131
2025-11-17Show search query in the page title (#8217)Gravatar Inverle
* Show search query in the page title * Simplify encoding --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
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-09Rename Extensions branch from master to main (#8194)Gravatar Alexandre Alapetite
For uniformity with other repos https://github.com/FreshRSS/Extensions/commit/dd20c6003e9c4fbcfb7b8e96317aa6e17ec120ea I made a tag https://github.com/FreshRSS/Extensions/releases/tag/master for back compatibility
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-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-22Add option to apply filter actions to existing articles (#7959)Gravatar Tommaso Ferrari
* Add option to apply filter actions to existing articles * make fix-all * Fixes * Another approach with preview New approach: https://github.com/FreshRSS/FreshRSS/pull/7959/commits/20479475c90ac954b991b3703c3cc76c16aa2d5c <img width="666" height="202" alt="image" src="https://github.com/user-attachments/assets/bb68ede4-60c8-4e0c-9317-c5ed7a6ad7df" /> Additional improvements: * Also implemented at category level, and at global level * Also implemented for favourites at global level Shortcomings: * Does not always work reliably with advanced regex, since the DB's flavour is not necessarily the same than PHP's Related: https://github.com/FreshRSS/FreshRSS/pull/8141 * make fix-all --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
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-16Add to search UI the user modification date (#8122)Gravatar Alexandre Alapetite
* Add to search UI the user modification date Follow-up of: * https://github.com/FreshRSS/FreshRSS/pull/8103 * https://github.com/FreshRSS/FreshRSS/pull/8093 * Easier UI to cancel filtering by date * Add blank <option> to ease deselection of <select>
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-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
2025-10-14Option to show user labels instead of tags in RSS share (#8112)Gravatar Alexandre Alapetite
* Option to show user labels instead of tags in RSS share fix https://github.com/FreshRSS/FreshRSS/discussions/8108#discussioncomment-14668813 <img width="711" height="182" alt="image" src="https://github.com/user-attachments/assets/8effb2cd-fffb-4f00-b628-54e963e8b2dc" />
2025-10-14New stats overview of dates with most unread articles (#8089)Gravatar Alexandre Alapetite
New view with direct links to dates with most unread articles: <img width="734" height="581" alt="image" src="https://github.com/user-attachments/assets/159a39b3-3a06-4ae9-9cc0-62ae36d9db9c" />
2025-10-14Fix drag&drop of user query losing information (#8113)Gravatar Alexandre Alapetite
* Fix drag&drop of user query losing information Information about RSS sharing was lost after a drag&drop * Fix related type cast
2025-10-11Last user modified (#7886)Gravatar Federico Scodelaro
* feat: Add user modified functionality Closes https://github.com/FreshRSS/FreshRSS/issues/7862 Changes proposed in this pull request: This is an implementation of the proposed feature. It allows entries to have a new field that will be updated whenever an item is marked as read/unread or bookmark/removed from bookmarks. And a new sort criteria to sort by it. How to test the feature manually: 1. Mark items from a feed as read/unread 2. Mark items from a feed as bookmark / remove bookmark 3. Sort by the new criteria * feat: Add sort functionality * feat: Add sort nav button * fix: Use correct migrations * fix: Add internationalization * fix: Linter errors * chore: PR comments * Update app/i18n/fr/index.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/i18n/pl/index.php Co-authored-by: Inverle <inverle@proton.me> * Update app/i18n/nl/index.php Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> * make fix-all * Fixes * More fixes sort * Fix wrong index * Fix unneeded column * Fix auto-create indexes * Some copilot suggestions * One more fix Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> Co-authored-by: Inverle <inverle@proton.me> Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2025-10-04Strengthen some crypto (#8061)Gravatar Alexandre Alapetite
For login, tokens, nonces
2025-10-01configurable notification timeout (#7942)Gravatar maTh
Ref #7931 Ref #5466 Ref #6409 added configuration in "Display" <img width="636" height="167" alt="grafik" src="https://github.com/user-attachments/assets/7bbc9f26-d91b-4dd2-b715-1d3f9b7a9ad3" /> * i18n: fr * Update app/i18n/pl/conf.php Co-authored-by: Inverle <inverle@proton.me> * make fix-all * max() * Minor whitespace (I am not a fan of excessive vertical indenting) --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> Co-authored-by: Inverle <inverle@proton.me>
2025-09-30Add hook enums (#8036)Gravatar Alexis Degrugillier
- add an enum to handle hook types (enum are available since PHP 8.1) - change hook calls from string value to enum value
2025-09-30Fix autocomplete issues in change password form (#7812)Gravatar Inverle
## Screenshots <details> <summary>Before</summary> <img width="773" height="652" alt="image" src="https://github.com/user-attachments/assets/89a0e58c-8c4a-41ff-b5d6-3e916079d563" /> </details> <details> <summary>After</summary> <img width="1006" height="646" alt="image" src="https://github.com/user-attachments/assets/f4575103-7365-4870-a170-2742bf10eb27" /> </details> This is an example on Firefox, where the `Master authentication token` field was incorrectly being autofilled. Red borders are indicating that the fields are required. ## List of changes * `required="required"` is now being added to the password fields if the section is open * The `challenge` field is being added if section is open instead of when at least one of the password fields isn't empty due to autocomplete * Added `autocomplete="new-password"` on fields that shouldn't be autocompleted * Unfortunately Chrome requires a workaround with CSS * Not tested on Safari yet * User will be redirected to profile page after successfully changing their password instead of index page ## How to test Autocomplete related changes should be tested on a HTTPS page with saved credentials for FreshRSS
2025-09-29Fix more CSRFs (#8035)Gravatar Inverle
Follow-up of #8000 Some were still missed in `feedController`. even had comments but no check: https://github.com/FreshRSS/FreshRSS/blob/0d463b67bdade2e896b7fa74595950eeaadd55fe/app/Controllers/feedController.php#L1053-L1055 https://github.com/FreshRSS/FreshRSS/blob/0d463b67bdade2e896b7fa74595950eeaadd55fe/app/Controllers/feedController.php#L374-L376
2025-09-25Prevent logout CSRFs (#7999)Gravatar Inverle
By avoiding `FreshRSS_Context::initUser()` calls
2025-09-24Fix some CSRFs (#8000)Gravatar Inverle
In two bookmark actions and one in `entryController` Completes one TODO from #7923: https://github.com/FreshRSS/FreshRSS/blob/de624dc8ce63ec819c61216d9d44f828841c293e/app/Controllers/entryController.php#L257 (a POST request is already sent in the frontend)
2025-09-21Add option for CSP frame-ancestors (#7857)Gravatar Alexandre Alapetite
* Add option for CSP frame-ancestors https://github.com/FreshRSS/FreshRSS/discussions/7856 * Revert contentSelectorPreviewAction * Same for f.php and api * Fix double init in f.php * No sandbox for API page
2025-09-21Move update one step before (#7989)Gravatar Inverle
Closes https://github.com/FreshRSS/FreshRSS/issues/7897
2025-09-18Add `entry_before_update` and `entry_before_add` hooks (#7977)Gravatar KleinMann
Discussion: https://github.com/FreshRSS/FreshRSS/discussions/7973 Changes proposed in this pull request: - Add new extension hook "entry_before_add" - Add new extension hook "entry_before_update" How to test the feature manually: 1. Create extension that uses the hooks and confirm they are invoked correctly. Extension to use for testing https://github.com/rnkln/freshrss-xExtension-Discord/pull/2
2025-09-17Keep sort and order after marking as read (#7974)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/7867
2025-09-15Clarify: Visibility hidden vs. archived (#7970)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/7887 We have two concepts: how much a feed is shown or not (controlled by priority), and how often a feed is refreshed (or not, in which case it is archived). This PR removes the wording *Archived* from the *visibility* parameter, since this is not what it does.
2025-09-15Fix another user self-delete regression (#7877)Gravatar Inverle
Regression from #7763 Earlier regression which was fixed before #7626 In addition: * get rid of `data-toggle` (refactor) * show invalid login message if deleting account and entered incorrect password instead of redirect to 403 * remove unused reference to `r` parameter * `forgetOpenCategories()` on login not on any crypto form
2025-09-14Recovery: skip broken entries during CLI export/import (#7949)Gravatar Alexandre Alapetite
* Recovery: skip broken entries during CLI export/import fix https://github.com/FreshRSS/FreshRSS/discussions/7927 ``` 25605/25605 (48 broken) ``` Help with *database malformed* or other corruption. * Compatibility multiple databases
2025-09-09Use `Minz_Translate::exists()` for language check in `createUser()` (#7934)Gravatar Inverle
(consistency) Related / follow-up: #7878
2025-09-09Add a default language constant (#7933)Gravatar Alexis Degrugillier
This replace the use of `en` through out the code.
2025-09-05Change how files are included (#7916)Gravatar Alexis Degrugillier
1. `include`, `include_once`, `require` and `require_once` are expressions not functions, parentheses are not necessary. 2. to move up the directory tree, it's better to use the `dirname` function instead of relying on `/..`.
2025-09-05Fixes for no-cache.txt (#7907)Gravatar Inverle
* Closes and fixes error from #7885 * `no-cache.txt` is now respected in `f.php`, `ext.php` and `serve` action in `extensionController` * And in all other places that weren't checking for `no-cache.txt` (some extensions maybe)
2025-09-01fix: add validation when creating a new tag (#7890)Gravatar Alexis Degrugillier
A tag name must be unique and can't be used as a category. There were no error message when creating a tag identical to an existing category. Now, this is addressed. See #7686 Closes #7686 Changes proposed in this pull request: - add validation on tag creation How to test the feature manually: 1. create a new category (ex: `HW`) 2. create a new tag with the same name as the new category (ex: `HW`) 3. validate that the appropriate error message is displayed