Commit Graph

840 Commits

Author SHA1 Message Date
Alexandre Alapetite
d80171ebfd Back-compatibility cURL 7.51 (#7409)
* Back-compatibility cURL 7.51
fix https://github.com/FreshRSS/FreshRSS/issues/7381
And add cURL version to system info.
Do not require a specific version of cURL for now, but maybe later.

* Fix CI

* make fix-all

* Add TODOs

* Add ssl_version

* Update app/i18n/it/index.php

Co-authored-by: UserRoot-Luca <55756898+UserRoot-Luca@users.noreply.github.com>

---------

Co-authored-by: UserRoot-Luca <55756898+UserRoot-Luca@users.noreply.github.com>
2025-03-08 11:49:05 +01:00
Alexandre Alapetite
a1b5893bd3 Fix Minz_Request::paramArray (#7400)
fix https://github.com/FreshRSS/FreshRSS/issues/7371
Regression from https://github.com/FreshRSS/FreshRSS/pull/7131
2025-03-05 16:45:34 +01:00
Alexandre Alapetite
ecdb63c335 Fix regression cURL HTTP headers (#7403)
* Fix regression cURL HTTP headers
fix https://github.com/FreshRSS/FreshRSS/issues/6712#issuecomment-2697961491
We would sometimes wrongly override the default HTTP headers of SimplePie
https://github.com/FreshRSS/simplepie/pull/33
https://github.com/simplepie/simplepie/pull/912

* Sync SimplePie
https://github.com/FreshRSS/simplepie/pull/33
2025-03-05 16:45:06 +01:00
Alexandre Alapetite
f477a261d6 Update dev tools (#7347)
In particular those not covered by Dependabot
2025-02-21 13:57:56 +01:00
maTh
1e8ef4bb72 Improve notifications: notificationName (#7287)
* notificationID

* 3 first examples

* fix

* notificationID -> notificationName

* Update lib/Minz/Request.php

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

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-02-02 19:15:03 +01:00
Alexandre Alapetite
d7ca2f8768 Doc force-https (#7259)
* Doc force-https
https://github.com/FreshRSS/FreshRSS/discussions/7252#discussioncomment-11951183

* Forgotten ^

* More proper support for comments
2025-01-26 23:19:44 +01:00
Alexandre Alapetite
22b74b0a57 Improve cURL proxy options (#7231)
3 is now used for CURLPROXY_HTTPS2
f07612cd9a/include/curl/curl.h (L789)
Related to https://github.com/FreshRSS/FreshRSS/issues/7209
2025-01-25 09:14:08 +01:00
Alexandre Alapetite
4d7584312a CssXPath 1.3.0 (#7211)
No change
https://github.com/PhpGt/CssXPath/pull/227#issuecomment-2580589055
2025-01-11 14:39:34 +01:00
Alexandre Alapetite
5368f38753 Reduce undeeded use of elvis operator ?: (#7204) 2025-01-10 08:13:09 +01:00
Alexandre Alapetite
50adb55982 Add some missing PHP native types (#7191)
* Add some missing PHP native types
Replaces https://github.com/FreshRSS/FreshRSS/pull/7184

* Clean some types
2025-01-08 13:26:09 +01:00
Alexandre Alapetite
1f466d7a2e Implement custom order-by (#7149)
Add option to sort results by received date (existing, default), publication date, title, URL (link), random.

fix https://github.com/FreshRSS/FreshRSS/issues/1771
fix https://github.com/FreshRSS/FreshRSS/issues/2083
fix https://github.com/FreshRSS/FreshRSS/issues/2119
fix https://github.com/FreshRSS/FreshRSS/issues/2596
fix https://github.com/FreshRSS/FreshRSS/issues/3204
fix https://github.com/FreshRSS/FreshRSS/issues/4405
fix https://github.com/FreshRSS/FreshRSS/issues/5529
fix https://github.com/FreshRSS/FreshRSS/issues/5864
fix https://github.com/FreshRSS/Extensions/issues/161

URL parameters:
* `&sort=id` (current behaviour, sorting according to newest received articles)
* `&sort=date` (publication date, which is not indicative of how new an article is)
* `&sort=title`
* `&sort=link`
* `&sort=rand` (random order - which disables infinite scrolling, at least for now)

combined with `&order=ASC` or `&order=DESC`

![image](https://github.com/user-attachments/assets/2de5aef1-604e-4a73-a147-569f6f42a1be)

## Implementation notes

The sorting criteria by *received date* (id), which is the default, and which was the only one before this PR, is the one that has the best sorting characteristics:
* *uniqueness*: no entries have the exact same received date
* *monotonicity*: new entries always have a higher received date
* *performance*: this field is efficiently indexed in database for fast usage, including for paging (indexing could also be done to other fields, but with lower effective performance)

In contrary, sorting criteria such as by *publication date*, by *title*, or by *link* are neither unique nor monotonic. In particular, multiple articles may share the same *publication date*, and we may receive articles with a *publication date* far in the future, and then later some new articles with a *publication date* far in the past.

To understand why sorting by *publication date* is problematic, it helps to think about sorting by *title* or by *link*, as sorting by *title* and by *publication date* share more or less the same characteristics.

### Problem 1: new articles

New articles may be received in the background after what is shown on screen, and before the next user action such as *mark all as read*. Due to the lack of *monotonicity* when sorting by e.g. *publication date* or *title*, users risk marking as read a batch of articles containing some fresh articles without seeing them.

Mitigation: A parameter `idMax` tracks the maximum ID related to a batch of actions such as *mark all as read* to exclude articles received after those that are displayed.

### Problem 2: paging / pagination

When navigating articles, only a few articles are displayed, and a new "page" of articles needs to be received from the database when scrolling down or when clicking the button to show more articles. When sorting by e.g. *publication date* or *title*, it is not trivial to show the next page without re-showing some of the same articles, and without skipping any. Indeed, views are often with additional criteria such as showing only unread articles, and users may mark some articles as read while viewing them, hereby removing some articles from the previous pages. And like for *Problem 1*, new articles may have been received in the background. Consequently, it is not possible to use `OFFSET` to implement pagination (so the patches suggested by a few users were wrong due to that, in particular).

Mitigation: `idMax` is also used (just like for *Problem 1*) and a *Keyset Pagination* approach is used, combining an unstable sorting criterion such as *publication date* or *title*, together with *id* to ensure stable sorting. (So, 2 sorting criteria + 1 filter criteria)

See e.g. https://www.alwaysdeveloping.net/dailydrop/2022/07/01-keyset-pagination/

### Problem 3: performance

Sorting by anything else than *received date* (id) is doomed to be slow(er) due to the combination of 3 criteria (see *Problem 2*). An `OFFSET` approach (which is not possible anyway as explained) would be even slower. Furthermore, we have no SQL index at the moment, but they would not necessarily help much due to the multiple sorting criteria needed and involving some `OR` logic which is difficult to optimise for databases.

The nicest syntax would be using tuples and corresponding indexes, but that is poorly supported by MySQL https://bugs.mysql.com/bug.php?id=104128

Mitigation: a compatibility SQL syntax is used to implement *Keyset Pagination*

### Problem 4: user confusion

Several users have shown that they do not fully understand the difference between *received date* and *publication date*, and particularly not the pitfalls of *publication date*.

Mitigation: the menus to mark-as-read *before 1 day* and *before 1 week* are disabled when sorting by anything else than *received date*. Likewise, the separation headers *Today* and *Yesterday* and *Before yesterday* are only shown when sorting by *received date*.

Again here, to better understand why, it helps to think about sorting by *title* or by *link*, as sorting by *title* and by *publication date* share more or less the same characteristics.

* [ ] We should write a Q&A and/or documentation about the problems associated to *sorting by publication date*: risks of not noticing new publication, of inadvertently marking them as read, of having some articles with a date in the future hanging at the top of the views (vice versa when sorting in ascending order), performance, etc.

### Problem 5: APIs

Sorting by anything else than *received date* breaks the guarantees needed for a successful synchronisation via API.

Mitigation: sorting by *received date* is ensured for all API calls.
2025-01-06 16:00:00 +01:00
Alexandre Alapetite
b1d24fbdb7 PHPStan 2.0 (#7131)
* PHPStan 2.0
fix https://github.com/FreshRSS/FreshRSS/issues/6989
https://github.com/phpstan/phpstan/releases/tag/2.0.0
https://github.com/phpstan/phpstan/blob/2.0.x/UPGRADING.md

* More

* More

* Done

* fix i18n CLI

* Restore a PHPStan Next test
For work towards PHPStan Level 10

* 4 more on Level 10

* fix getTagsForEntry

* API at Level 10

* More Level 10

* Finish Minz at Level 10

* Finish CLI at Level 10

* Finish Controllers at Level 10

* More Level 10

* More

* Pass bleedingEdge

* Clean PHPStan options and add TODOs

* Level 10 for main config

* More

* Consitency array vs. list

* Sanitize themes get_infos

* Simplify TagDAO->getTagsForEntries()

* Finish reportAnyTypeWideningInVarTag

* Prepare checkBenevolentUnionTypes and checkImplicitMixed

* Fixes

* Refix

* Another fix

* Casing of __METHOD__ constant
2024-12-27 12:12:49 +01:00
Alexandre Alapetite
35a2045d0c Merge SimplePie 1.8.1 (#7067)
https://github.com/FreshRSS/simplepie/pull/32
2024-12-05 23:24:55 +01:00
dependabot[bot]
b84cbce905 Update phpmailer/phpmailer requirement from 6.9.2 to 6.9.3 in /lib (#7046)
* Update phpmailer/phpmailer requirement from 6.9.2 to 6.9.3 in /lib

Updates the requirements on [phpmailer/phpmailer](https://github.com/PHPMailer/PHPMailer) to permit the latest version.
- [Release notes](https://github.com/PHPMailer/PHPMailer/releases)
- [Changelog](https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md)
- [Commits](https://github.com/PHPMailer/PHPMailer/compare/v6.9.2...v6.9.3)

---
updated-dependencies:
- dependency-name: phpmailer/phpmailer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update phpmailer

---------

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>
2024-12-01 20:13:27 +01:00
Luc SANCHEZ
15745d42b7 Upgrade code to php 8.1 (#6748)
* revert
Fix code indentation
Fix code

Upgrade code to php 8.1

* fix remarques

* code review

* code review

* code review

* Apply suggestions from code review

* code review

* Fixes

* Many remainging updates of array syntax

* Lost case 'reading-list'

* Uneeded PHPDoc

---------

Co-authored-by: Luc Sanchez <l.sanchez-prestataire@alptis.fr>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-11-28 17:11:04 +01:00
Alexandre Alapetite
278181572e Add extension hook simplepie_after_init (#7007)
* Add extension hook simplepie_after_init
fix https://github.com/FreshRSS/FreshRSS/issues/7006

* Add documentation note

* fix doc get_headers

* Syntax void

* Forgotten code
2024-11-21 08:22:13 +01:00
dependabot[bot]
b7bff9484f Update phpmailer/phpmailer requirement from 6.9.1 to 6.9.2 in /lib (#6968)
* Update phpmailer/phpmailer requirement from 6.9.1 to 6.9.2 in /lib

Updates the requirements on [phpmailer/phpmailer](https://github.com/PHPMailer/PHPMailer) to permit the latest version.
- [Release notes](https://github.com/PHPMailer/PHPMailer/releases)
- [Changelog](https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md)
- [Commits](https://github.com/PHPMailer/PHPMailer/compare/v6.9.1...v6.9.2)

---
updated-dependencies:
- dependency-name: phpmailer/phpmailer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update library code

---------

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>
2024-11-01 23:22:22 +01:00
Ramazan Sancar
643a31558c upd: Turkish translations have been completed. Changes have been made to words in previous translations. (#6960)
* upd: Update Turkish translation

* upd: "Ramazan Sancar" was added to Credits.md.

* upd: Turkish translations have been completed. Changes have been made to words in previous translations.
upd: fixed ellipsis usage.

* Update app/i18n/tr/gen.php

* add: Turkish translations have been made for Core Extensions (User CSS, UserJS).

* Update app/i18n/tr/sub.php

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

* Update app/i18n/tr/sub.php

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

* Update app/i18n/tr/sub.php

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

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-11-01 10:42:28 +01:00
Alexandre Alapetite
1a9d24d0dd Fix favicon error in case of wrong URL (#6899)
fix https://github.com/FreshRSS/FreshRSS/issues/6898
2024-10-17 10:42:12 +02:00
Alexandre Alapetite
df763eb8b3 Add hook entries_favorite (#6880)
Called when entries are starred or unstarred
2024-10-14 09:35:41 +02:00
Alexandre Alapetite
91624037c7 Apache protect more non-public folders and files (#6881)
* Apache protect more non-public folders

* Also protect root

* Do the same for /p/

* Simplify Require all denied
In case of Apache 2.2, it will just make an error 500 instead of 403

* .htaccess.dist

* Simplify

* Better comment
2024-10-11 09:25:43 +02:00
Alexandre Alapetite
a792c195d2 Sync SimplePie (#6840)
FreshRSS upstream PR merged https://github.com/simplepie/simplepie/pull/883
2024-09-29 16:17:26 +02:00
Alexandre Alapetite
1c09408c64 Fix HTML encodings in e.g. cURL options (#6821)
* Fix HTML encodings in e.g. cURL options

* Trim headers whitespace
2024-09-22 11:05:06 +02:00
Alexandre Alapetite
7b2e87fd33 Remove HTTP Referer (#6822)
* Remove HTTP Referer
https://github.com/FreshRSS/simplepie/pull/27
https://github.com/FreshRSS/FreshRSS/pull/6523
fix https://github.com/FreshRSS/FreshRSS/issues/6811
https://github.com/simplepie/simplepie/issues/224

* Bump SimplePie commit
2024-09-21 15:41:14 +02:00
Alexandre Alapetite
ffc3d393e5 SimplePie support for HTTP cache policies (#6812)
* SimplePie support for HTTP cache policies
Discussion in https://github.com/FreshRSS/simplepie/pull/26

* Bump SimplePie commit

* Typos

* Typos

* Simpler logic

* Explicitly disable cache for non-GET flows

* Bump SimplePie commit

* Bump SimplePie commit

* Bump SimplePie commit

* Bump SimplePie commit
2024-09-20 23:25:38 +02:00
Alexandre Alapetite
469a42d9c3 Rename param specialchars to plaintext (#6809)
https://github.com/FreshRSS/FreshRSS/pull/6800#discussion_r1756435762
2024-09-15 12:00:46 +02:00
Artur Weigandt
882deab455 Allow SimplePie updates with composer (#4374)
* rename lib/SimplePie to lib/CustomSimplePie

* add test for autoloading SimplePie with PSR-0

* install SimplePie 1.6.0

* Add SimplePie CHANGELOG.md, ignore irrelevant files

* remove unmodified custom classes

* rename all customized SimplePie classes

* Add autoloading for SimplePie PSR-0 and CustomSimplePie classes

* let CustomSimplePie extends SimplePie, remove unchanged code

* let CustomSimplePieMisc extends SimplePie\Misc, remove unchanged code

* Add tests for autoloading

* let CustomSimplePieContentTypeSniffer extends Sniffer, remove unchanged code

* remove unchanged CustomSimplePieEnclosure class

The fixed typos are commited to SimplePie
See 133eac158c

* let CustomSimplePieFile extends SimplePie\File, remove unchanged code

* let CustomSimplePieParser extends SimplePie\Parser, remove unchanged code

* let CustomSimplePieSanitize extends SimplePie\Sanitize, remove unchanged code

* let CustomSimplePieHttpParser extends SimplePie\HTTP\Parser, remove unchanged code

* Remove CustomSimplePie

* Switch SimplePie repo to https://github.com/FreshRSS/simplepie.git

* move to latest branch, update all SimplePie source files

* Use namespaced SimplePie classes, remove SimplePie library folder

* Update to latest SimplePie version with FreshRSS modifications

* Bump SimplePie
Tests expected to fail due to missing a backport of functionalities

* Add fork-specific readme

* Re-implement initial syslog SimplePie GET
https://github.com/FreshRSS/FreshRSS/pull/815
Lacks https://github.com/FreshRSS/FreshRSS/pull/6061

* Closer backport of syslog SimplePie GET
https://github.com/FreshRSS/FreshRSS/pull/6061
But the requests logs will be in the wrong order in case of redirections

* Fixes

* lib update

* SimplePie include a few more files

* Try with cache-hash branch

* Point to newer commit

* Point to newer commit

* Finalise logs

* Finalise

* Bump SimplePie commit

* Bump SimplePie commit

* Readme SimplePie fork

* Bump SimplePie commit

* Better logging

* Bump SimplePie commit

* Reworked approach to work with SimplePie cache
Simpler FreshRSS patches

* Bump SimplePie commit
https://github.com/FreshRSS/simplepie/pull/22

* Simplepie846
https://github.com/FreshRSS/simplepie/pull/23
And additional fixes

* Remove log

* Cherry pick relevant unmerged SimplePie PRs

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-09-14 23:11:10 +02:00
Alexandre Alapetite
fd1b5e9343 Fix inversed encoding logic in paramArray (#6800)
* Fix inversed encoding logic in paramArray
https://github.com/FreshRSS/FreshRSS/pull/6797#discussion_r1754661634
Also fix the possibility to use `<'&">` in shortcuts, and some minor encoding bugs in user queries

* Forgot paramArrayString
2024-09-12 11:04:49 +02:00
Alexandre Alapetite
dfac9f5813 PHPStan booleansInConditions (#6793)
* PHPStan booleansInConditions

* Uniformisation
2024-09-11 17:14:53 +02:00
Alexandre Alapetite
0ea13253af Fix warnings for PHP 8.4+ (#6781) 2024-09-06 10:41:11 +02:00
Alexandre Alapetite
1a552bd60e Regex search (#6706)
* Regex search
fix https://github.com/FreshRSS/FreshRSS/issues/3549

* Fix PHPStan

* Fix escape

* Fix ungreedy

* Initial support for regex search in PostgreSQL and MySQL

* Improvements, support MySQL

* Fix multiline

* Add support for SQLite

* A few tests

* Added author: and inurl: support, documentation

* author example

* Remove \b for now

* Disable regex sanitization for now

* Fix getInurlRegex

* getNotInurlRegex

* Quotes for inurl:

* Fix test

* Fix quoted tags + regex for tags
https://github.com/FreshRSS/FreshRSS/issues/6761

* Fix wrong regex detection

* Add MariaDB

* Fix logic

* Increase requirements for MySQL and MariaDB
Check support for multiline mode in MySQL

* Remove sanitizeRegexes()

* Allow searching HTML code
Allow searching for instance `/<pre>/`
Fix https://github.com/FreshRSS/FreshRSS/issues/6775#issuecomment-2331769883

* Doc regex search HTML

* Fix Doctype
2024-09-06 09:35:58 +02:00
Alexandre Alapetite
9f4f6e9cac Bump phpgt/cssxpath (#6618)
Includes https://github.com/PhpGt/CssXPath/pull/227
Follow-up of https://github.com/PhpGt/CssXPath/pull/227 for PHP 8.4
Requires PHP 8.0+
Full diff d99d35f719...45f3ac151f
2024-09-06 09:11:37 +02:00
Alexandre Alapetite
a81656c3ed Upgrade to PHP 8.1 (#6711)
* Upgrade to PHP 8.1
As discussed in https://github.com/FreshRSS/FreshRSS/discussions/5474

https://www.php.net/releases/8.0/en.php
https://www.php.net/releases/8.1/en.php

Upgrade to available native type declarations
https://php.net/language.types.declarations

Upgrade to https://phpunit.de/announcements/phpunit-10.html which requires PHP 8.1+ (good timing, as version 9 was not maintained anymore)

Upgrade `:oldest` Docker dev image to oldest Alpine version supporting PHP 8.1: Alpine 3.16, which includes PHP 8.1.22.

* Include 6736
https://github.com/FreshRSS/FreshRSS/pull/6736
2024-09-06 09:06:46 +02:00
Alexandre Alapetite
efa0a92171 Fix feed title option (#6771)
fix https://github.com/FreshRSS/FreshRSS/issues/6756
2024-09-04 21:12:56 +02:00
Alexandre Alapetite
3c2167d60b Charset for JSON exchanges (#6710)
Apply some minor recommendations from Snyk scanner
2024-08-23 16:39:19 +02:00
Alexandre Alapetite
673b5309ea Fix HTTP cache for modified time when content is not modified (#6723)
Fix case when server is sending a new modified time while the content was not actually modified.
fix https://github.com/FreshRSS/FreshRSS/issues/6712
2024-08-19 19:10:54 +02:00
Alexandre Alapetite
c480e57161 Fix HTTP cache of user queries (#6718)
fix https://github.com/FreshRSS/FreshRSS/issues/6717
2024-08-16 22:40:56 +02:00
Alexandre Alapetite
d2247221bb Minor update whitespace PHPCS rules (#6666)
* Minor update whitespace PHPCS rules
To simplify our configuration, apply more rules, and be clearer about what is added or removed compared with PSR12.
Does not change our current conventions, but just a bit more consistent.

* Forgotten *.phtml

* Sort exclusion patterns + add a few for Extensions repo

* Relaxed some rules
2024-08-01 20:31:40 +02:00
Alexandre Alapetite
5c8369ce38 Strong type array parameter helper (#6661)
Also useful for extensions (including one I am writing)
2024-07-29 14:48:17 +02:00
Alexandre Alapetite
783fe19baa Remove dependency to exif extension (#6624)
* Remove dependency to exit extension
fix https://github.com/FreshRSS/FreshRSS/issues/6573

* Fix return
2024-07-17 17:33:17 +02:00
Alexandre Alapetite
5b28a35003 Pass PHPStan level 9 (#6544)
* More PHPStan

* More, passing

* 4 more files

* Update to PHPStan 1.11.4
Needed for fixed bug: Consider numeric-string types after string concat
https://github.com/phpstan/phpstan/releases/tag/1.11.4

* Pass PHPStan level 9
Start tracking booleansInConditions

* Fix mark as read

* Fix doctype

* ctype_digit
2024-06-09 20:32:12 +02:00
hkcomori
99b1d551e6 Add core extensions: UserCSS, UserJS (#6267)
* Copy CustomCSS and CustomJS

Original: FreshRSS/Extensions@9f21984

* Rename CustomCSS -> UserCSS

* Rename CustomJS -> UserJS

* Change metadata

The name is used for the directory where the configuration
is stored and should not contain spaces.
Since the name was changed, I reset the version number and
changed to semantic versioning.

* Change data directory

Changed the location of the configuration file to
the user data directory, because it is not `static`.
That way, the user's configurations are gathered
in the user directory, which makes it easier to backup them.

* Edit documentations

Remove procedures to install the extension
because it is no longer necessary.

* Fix wrong variables in the configuration page

Remove permission error indication because the storage location
is now in the user data directory managed by the application.

* Remove the `xExtension-` prefix for core extensions

* Set version to 1.0.0 for UserCSS, UserJS

* Refactoring

* Remove unused variables

* Remove version 0.0.1 in Changelog

Version 0.0.1 will not be merged, so only version 1.0.0 will remain.

* public getFileUrl

* Revert more protected

* Use entrypoint for extension user path instead of name

* Add space to extension name

* Add `#[\Override]`

* Add explains of User CSS and User JS to docs

* Remove README of User CSS and User JS

* Add migration code for extension user path

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-06-05 20:58:19 +02:00
Alexandre Alapetite
3cd90a2b1f Fix HTTP GET curl options (#6492)
fix https://github.com/FreshRSS/FreshRSS/issues/6491
Regression from https://github.com/FreshRSS/FreshRSS/pull/6177
2024-05-25 18:27:12 +02:00
Alexandre Alapetite
2d17c020b6 PHPStan 1.11 + minor update dev dependencies (#6459)
* PHPStan 1.11 + minor update dev dependencies
https://github.com/phpstan/phpstan/releases/tag/1.11.0

* Comment style
2024-05-15 08:57:58 +02:00
Alexandre Alapetite
4f57a46075 Auto-update 5038 (#6279)
* Auto-update 5038
https://github.com/FreshRSS/FreshRSS/pull/5038

* PostgreSQL

* Draft for MySQL

* More draft MySQL

* Finalise

* A bit more robust
2024-05-13 12:44:35 +02:00
Alexandre Alapetite
90fbb524ce Windows: release SQLite (#6285)
* Windows: release SQLite
fix https://github.com/FreshRSS/FreshRSS/issues/6275

* Do not use sharedPdo for deleting user

* Case of same user

* Help PHPStan
2024-04-21 16:25:37 +02:00
Alexandre Alapetite
7aaed6092f SimplePie replace iframe allow attribute (#6274)
* SimplePie strip iframe allow attribute
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#allow

Besides security, the `allow autoplay` atttribute is especially problematic on mobile (Firefox on Android) as it asks to open the YouTube app as soon as the article is opened.

Example of code before:

```html
<iframe data-original="https://www.youtube.com/embed/??????feature=oembed" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" sandbox="allow-scripts allow-same-origin"></iframe>
```

* Replace allow attribute

* Allow more
2024-04-11 08:48:50 +02:00
Alexandre Alapetite
350edf398c PHP 8.3 #[\Override] (#6273)
* PHP 8.3 #[\Override]
https://php.watch/versions/8.3/override-attr

With PHPStan `checkMissingOverrideMethodAttribute` https://phpstan.org/config-reference#checkmissingoverridemethodattribute

And modified the call to phpstan-next on the model of https://github.com/FreshRSS/Extensions/pull/228 (more robust than the find method, which gave some strange errors)

* Update extension example accordingly
2024-04-10 15:33:43 +02:00
Alexandre Alapetite
6e12781821 Fix SimplePie absolutize URL for several cases (#6270)
This is especially relevant for HTML+XPath mode, for which we rely on proper URL "absolutize"

Upstream PR https://github.com/simplepie/simplepie/pull/861
2024-04-08 11:13:01 +02:00
Alexandre Alapetite
e3c86a164d HTTP Get allow UTF-8 even when charset is far from top (#6271)
* HTTP Get allow UTF-8 even when charset is far from top
fix https://github.com/FreshRSS/FreshRSS/issues/5586

The case was an HTML document with 15k whitespace then 1.2k of scripts before the `<meta charset="utf-8">` (far from the 1024 bytes suggested by the spec..., and too far for DOMDocument)

* Rewording

* Trim also vertical tab + comment
2024-04-06 23:02:50 +02:00