3377 Commits

Author SHA1 Message Date
Alexandre Alapetite
00c61cf34c Fix serialisation of dates in searches (#8341)
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-24 01:19:06 +01:00
Alexandre Alapetite
6d57a9de47 Fix parsing of literal "or" in regex (#8338)
fix https://github.com/FreshRSS/FreshRSS/issues/7879
2025-12-23 11:58:51 +01:00
Alexandre Alapetite
1a3912f25a Improve configuration checks (#8334)
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-21 19:26:08 +01:00
Alexandre Alapetite
af1e5cb9bc More uniform SQL search and PHP search (#8329)
* 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-20 11:06:39 +01:00
stag
43a8e1e2d9 Allow negative category sort numbers (#8330)
Closes https://github.com/FreshRSS/FreshRSS/issues/8304
Remove the min=1 attribute so negative numbers can be used to force categories to the bottom
2025-12-17 23:46:03 +01:00
Alexandre Alapetite
00cd5df294 Use native PHP #[Deprecated] (#8325)
https://php.watch/versions/8.4/Deprecated
And enfore it with PHPUnit + PHPStan.
Especially useful for extensions.
2025-12-17 10:11:18 +01:00
Alexandre Alapetite
4bd5035914 Rework encoding of search filters (#8324)
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-17 10:07:52 +01:00
Alexandre Alapetite
6952a13958 Handle null in base64_encode (#8321)
* Handle null in base64_encode
https://github.com/FreshRSS/FreshRSS/discussions/8314#discussioncomment-15269370

* PHPDoc
2025-12-16 18:53:00 +01:00
Alexandre Alapetite
1c50193644 Fix array unique gaps (#8322)
https://github.com/FreshRSS/FreshRSS/discussions/8265#discussioncomment-15270212
2025-12-16 17:52:16 +01:00
Alexandre Alapetite
476e57b046 Reverse hash and nonce (#8320)
Safer password evaluation
2025-12-15 22:06:05 +01:00
Inverle
36118117f0 Improve scrolling into filter in sidebar (#8307)
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8281

todo:
* [x] Include labels (prefix `t_`) too
* [x] Keep sidebar scrollTop when using the nav menu
* [ ] ~~Make this work in the reader view's sidebar too~~ for separate PR
* [x] Prevent whole page from scrolling on `scrollIntoView()` call, just scroll in the sidebar (probably related: https://github.com/FreshRSS/FreshRSS/pull/8306#issuecomment-3647414618)

This TODO will be done in a separate PR since it requires optimizing the sidebar toggle code.
edit: it does work on Chrome already though, but only if `#stream` isn't too large / breaks randomly (Firefox is slower it seems)
2025-12-15 15:12:12 +01:00
Zexin Yuan
e6cb6e65a4 Improve simplified chinese translation (#8313)
* Improve simplified chinese translation

* Update translation progress

* Add yzx9 to contributors
2025-12-13 12:25:14 +01:00
Alexandre Alapetite
4b6127ee04 New links in transitions and jump to next transition (#8294)
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-13 11:38:33 +01:00
Alexandre Alapetite
a8a544a2a2 Fix search encoding and quoting (#8311)
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-13 11:31:34 +01:00
X.
73b37cdebe Translate English phrases to Chinese in gen.php (#8308)
* Translate English phrases to Chinese in gen.php

* make fix-all

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-12-12 08:28:27 +01:00
Alexandre Alapetite
044f066c1c Fix htmlspecialchars for search (#8306)
Regression from https://github.com/FreshRSS/FreshRSS/pull/8293
2025-12-11 18:18:22 +01:00
Alexandre Alapetite
394411677e Add functions to modify a search expression (#8293)
* 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-10 22:41:45 +01:00
Alexandre Alapetite
ec26638124 Fix saveHTML() scrambling encoding in newer libxml2 (#8296)
fix https://github.com/FreshRSS/FreshRSS/pull/8279#issuecomment-3620674818
2025-12-08 23:18:33 +01:00
Inverle
fd9e2843f1 Minor refactor <img class="icon"> -> _i('...') (#8297) 2025-12-08 20:32:28 +01:00
Inverle
9fb3a02b96 Keep scroll state of page when closing the slider (#8295) 2025-12-08 00:29:43 +01:00
Alexandre Alapetite
19975c22ec Fix minor backslashes (#8292) 2025-12-07 20:27:06 +01:00
Inverle
6d2bb24b37 Move unsafe autologin to an extension (#7958)
Completes the following TODO https://github.com/FreshRSS/FreshRSS/issues/7923:

de624dc8ce/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-04 20:10:20 +01:00
Alexandre Alapetite
78e40c6fe3 Scaling of user statistics (#8277)
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-04 19:11:31 +01:00
Inverle
d55f017ccd Implement button for toggling sidebar on all views (#8201)
* Implement button for toggling sidebar on all views

Closes https://github.com/FreshRSS/FreshRSS/issues/7673, https://github.com/FreshRSS/FreshRSS/issues/7100, https://github.com/FreshRSS/FreshRSS/issues/6119, https://github.com/FreshRSS/FreshRSS/issues/5338, https://github.com/FreshRSS/FreshRSS/issues/2792, https://github.com/FreshRSS/FreshRSS/issues/4224, https://github.com/FreshRSS/FreshRSS/issues/4136

https://github.com/user-attachments/assets/0629e465-6450-440e-b38b-430e9ff73ef9

Keyboard shortcut for doing the same: <kbd>t</kbd>

* Partially fix other views

Repartition page looks broken on Swage

* Correction

`close-aside` wasn't meant to be removed

* i18n(conf): fr

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* make fix-all

* Fix settings slider not opening in reader view

* make readme

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-12-04 08:48:03 +01:00
Inverle
60cf5ea297 Improve anonymous authentication logic (#8165)
* 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-04 08:46:11 +01:00
Alexandre Alapetite
1621f12a15 Fix HTML encoding in preview filters (alternative) (#8259)
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-04 00:02:58 +01:00
Alexandre Alapetite
a50e9a98db Fix MySQL / MariaDB database size calculation (#8282)
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-03 23:43:03 +01:00
Alexandre Alapetite
3c4a46e6ba Fix CLI user creation warning when language is not given (#8283)
Discovered during https://github.com/FreshRSS/FreshRSS/pull/8277
2025-12-03 23:41:06 +01:00
dependabot[bot]
6431520ae5 Bump phpstan/phpstan from 2.1.31 to 2.1.32 (#8275)
* 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-12-02 10:44:39 +01:00
Alexandre Alapetite
023cdf0d7a Web scraping support date format epoch milliseconds (#8266)
fix https://github.com/FreshRSS/FreshRSS/discussions/8264
Auto detect whether a `U` date format should be in seconds or milliseconds.
2025-11-30 21:42:46 +01:00
Alexandre Alapetite
76f5bee76d Better merging of custom HTTP headers (#8251)
Alternative to https://github.com/FreshRSS/FreshRSS/pull/8246
See https://github.com/FreshRSS/FreshRSS/issues/8189#issuecomment-3569434305
2025-11-27 23:31:03 +01:00
Alexandre Alapetite
5e0093aa00 Fix MariaDB updateCachedValues (#8255)
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-26 23:47:29 +01:00
Alexandre Alapetite
b3cfc387b8 Fix MariaDB for updates (#8254)
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-26 16:47:40 +01:00
Inverle
fbfc5eacad Add data: to CSP in subscriptionController (#8253)
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-26 10:06:44 +01:00
Alexandre Alapetite
06d34f9b8e OPML export/import of unicity criteria (#8243)
Found during https://github.com/FreshRSS/FreshRSS/discussions/8242#discussioncomment-15052838
2025-11-24 22:01:46 +01:00
Horváth Zsolt
a2f309a800 Update hungarian translation (#8244)
* Update hungarian translation

* Change translation to make it consistent

Co-authored-by: András Marczinkó <andris155@users.noreply.github.com>
2025-11-24 21:59:18 +01:00
Alexandre Alapetite
a7579e0cf5 Catch lack of exec function for git update (#8228) 2025-11-20 22:16:22 +01:00
Alexandre Alapetite
8fdc574827 Fix search form for regex (#8226)
Wrongly quoted
Cherry-picked from https://github.com/FreshRSS/FreshRSS/pull/8131
2025-11-17 20:39:45 +01:00
Inverle
f5d14af156 Show search query in the page title (#8217)
* Show search query in the page title

* Simplify encoding

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-11-17 18:32:56 +01:00
Alexandre Alapetite
deb7633c49 Change SQL update query (#6957)
* 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-17 13:48:48 +01:00
Alexandre Alapetite
419a1978b6 Fix MySQL commitNewEntries (#8223)
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-17 13:46:28 +01:00
Alexandre Alapetite
9050598b08 Fix undefined array key CURLOPT_PROXY (#8218)
> PHP Warning:  Undefined array key 10004 in ./FreshRSS/app/Utils/httpUtil.php on line 276
2025-11-16 12:30:44 +01:00
Martin Hartmann
b6314bee31 force correct index for MySQL when listing entries (#8211)
* force correct index for MySQL when listing entries

* Make special case for MySQL / MariaDB

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-11-15 23:17:13 +01:00
Alexandre Alapetite
45471871dd SQL: Optimise speed of updateCachedValues() (#8207)
For PostgreSQL and SQLite
fix https://github.com/FreshRSS/FreshRSS/issues/8206
2025-11-15 20:11:25 +01:00
Alexandre Alapetite
947a8c015a Exclude local networks for domain-wide Retry-After (#8195)
* Exclude local networks for domain-wide Retry-After
Retry-After will be applied by URL and not by domain for local networks.
fix https://github.com/FreshRSS/FreshRSS/issues/7880

* Improved logic for detection of local domains

* Support ip6-localhost and a couple more variants

* On more: .lan

* Resolve IP address

* Add .intranet
2025-11-13 11:46:45 +01:00
András Marczinkó
14b394c72a Fix duplicate semicolon in entry_header (#8203)
* Fix duplicate semicolon in entry_header

* Fix some more redundant syntax

Co-authored-by: Inverle <inverle@proton.me>

---------

Co-authored-by: Inverle <inverle@proton.me>
2025-11-11 22:55:18 +01:00
Alexandre Alapetite
a18c35046d Housekeeping lib_rss.php (#8193)
* 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-11 08:17:12 +01:00
Alexandre Alapetite
5e622c60fa Rename Extensions branch from master to main (#8194)
For uniformity with other repos
dd20c6003e
I made a tag https://github.com/FreshRSS/Extensions/releases/tag/master for back compatibility
2025-11-09 11:58:29 +01:00
McFev
67c22389c2 i18n(ru): 100% complete (#8197)
* i18n(ru): 100% complete

* make fix-all

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-11-09 11:57:50 +01:00
maTh
e3fedceeb9 less margin - wrapper div deleted (#8196)
Follow up https://github.com/FreshRSS/FreshRSS/pull/8190 and https://github.com/FreshRSS/FreshRSS/pull/8152

before:
<img width="1090" height="449" alt="grafik" src="https://github.com/user-attachments/assets/ee6a54a2-3602-4f2c-8eb2-cb186287e245" />


After:
<img width="907" height="452" alt="grafik" src="https://github.com/user-attachments/assets/3a3066e5-90e1-4b65-a1c4-18964494f644" />
2025-11-08 22:53:28 +01:00