Commit Graph

42 Commits

Author SHA1 Message Date
Alexandre Alapetite
be5f9f2dce When ssl_verify is false, decrease SSL security (#3171)
When ssl_verify option is set to false for a feed, allow lower security such as SHA-1 signatures.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900984
https://stackoverflow.com/questions/58342699/php-curl-curl-error-35-error1414d172ssl-routinestls12-check-peer-sigalgwr
Fix error of type `cURL error 35: error:1414D172:SSL routines:tls12_check_peer_sigalg:wrong signature`
Example of feeds:
https://www.version2.dk/it-nyheder/rss
https://ing.dk/rss/nyheder
2020-09-03 10:35:23 +02:00
Alexis Degrugillier
8d8211b2a5 Add machine-readable dates in views (#3106)
This will allow to make some transformations on dates when needed.
See #3103 and #853
2020-07-14 10:51:45 +02:00
Alexandre Alapetite
e1ef88d815 Fix memory leak when using lib_phpQuery (#3004)
* Fix memory leak when using lib_phpQuery

This library keeps documents in static class, so it requires a special
call to clean them.

* Another unload
2020-05-25 16:02:52 +02:00
Alexandre Alapetite
b906d79d61 getContentByParsing follow HTML redirections (#2985)
* getContentByParsing follow HTML redirections

Add the ability to follow HTML redirections in getContentByParsing:

```html
<meta http-equiv="Refresh" content="1; url=https://example.net/article123.html" />
```

* Better regex

* Trim http-equiv
2020-05-21 11:56:55 +02:00
Alexandre Alapetite
83b5944dcb Stream instead of memory copy of SimplePie entries (#2972)
* Stream instead of memory copy of SimplePie entries

https://github.com/FreshRSS/FreshRSS/issues/2952

* Undo lines delete

* Typo

* Remove unaccessible code

https://github.com/FreshRSS/FreshRSS/pull/2972/files#r425624163

* Back-compatibility for Feed->entries

https://github.com/FreshRSS/FreshRSS/pull/2972/files#r425631913
2020-05-17 00:04:51 +02:00
Alexandre Alapetite
b1aac20839 Fever integer type for numbers (#2946)
* Fever integer type for feed ID

#Fix
https://github.com/FreshRSS/FreshRSS/issues/2940#issuecomment-623022435

* Fix feed_id

* Ensure string for entry ID

To be compatible with 32-bit platforms.
Before, the type was inconsistent depending on architecture + database

* Integer for entry count functions
2020-05-03 13:39:16 +02:00
Alexandre Alapetite
bdc4da6ad0 Expose podcast in API (#2898)
* Expose podcast in API

Expose RSS enclosures in our API, e.g. for clients supporting podcasts

* PHP CS?

* Annoying linter

* Light optimisation
2020-04-16 18:11:26 +02:00
Alexandre Alapetite
be582713fe Fix action filter when filtering on author (#2863)
#fix https://github.com/FreshRSS/FreshRSS/issues/2806
Bug: array instead of string
2020-03-31 17:57:05 +02:00
Alexandre Alapetite
e9f879b411 Fallback to GUID when entry title is empty (#2813)
When entries have an empty title, our UI was a bit broken. In this
(rare) case, we revert to GUID, which is always non-empty.
2020-02-29 18:14:29 +01:00
shn7798
0b6d39a795 Fix wrong foreach in applyFilterActions (#2809) 2020-02-29 16:12:04 +01:00
Julien-Pierre Avérous
d30ac40772 Enhance content path feature (#2778)
- Add a maintenance section to be able to clear cache and force reload a feed.
- Add an icon next to path field to show a pop-up with the result of the content path.

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Marien Fressinaud <dev@marienfressinaud.fr>
2020-02-13 18:22:35 +01:00
Julien-Pierre Avérous
f3ff4a59e6 Fix 'dateAdded()' getter (#2774)
Be homogeneous in field used, to prevent weird behavior in the future.
2020-01-20 11:23:55 +01:00
Julien-Pierre Avérous
01576e6317 [API, extension] Use 'dateAdded()' to forge 'crawlTimeMsec' & 'timestampUsec' field in greader API. (#2773)
- Add the ability to customize 'dateAdded()', so an extension can change it if needed.
2020-01-18 11:58:46 +01:00
Alexandre Alapetite
acc50df0ef Fix logging environment constants (#2745)
* Fix logging environment constants

* COPY_LOG_TO_SYSLOG was only working when Syslog was used
* FRESHRSS_ENV was not properly used to set logging level

* Simplify code

Always call `openlog()` even when it is not used

* Always specify syslog properties

https://github.com/FreshRSS/FreshRSS/pull/2745#discussion_r362207445

* $username is also needed further down

* No new line in syslog
2020-01-03 18:50:33 +01:00
Alexandre Alapetite
e3e5954394 PDO refactoring for code simplification (#2522)
* PDO refactor

* Automatic prefix when using the syntax `_tableName`
* Uniformity: MySQL is now PDO::ATTR_EMULATE_PREPARES = false just like SQLite and PostgreSQL, with consequences such as only one statement per query
* Use PDO methods exec(), query(), prepare() + execute() in a more efficient way
* Remove auto-update SQL code for versions older than FreshRSS 1.5 (3 years old)
* The name of the default category is set in PHP instead of in the DB (simplies SQL and allows changing the name according to the FreshRSS language)
* Rename `->bd` to `->pdo` (less of a frenshism, and more informative)
* Fix some requests, which were not compatible with MySQL prepared statements

* Whitespace

* Fix syntax for PostgreSQL sequences

+ MySQL install

* Minor formatting

* Fix lastInsertId for PostgreSQL

* Use PHP 5.6+ const

Take advantage of https://github.com/FreshRSS/FreshRSS/pull/2527
https://www.php.net/manual/en/migration56.new-features.php

* A bit of forgotten PHP 5.6 simplification for cURL

* Forgotten $s

* Mini fix custom user config

https://github.com/FreshRSS/FreshRSS/pull/2490/files#r326290346

* More work on install.php but not finished

* install.php working

* More cleaning of PDO in install

* Even more simplification

Take advantage of PDO->exec() to run multiple statements

* Disallow changing the name of the default category

https://github.com/FreshRSS/FreshRSS/pull/2522#discussion_r326967724
2019-09-29 16:22:50 +02:00
Alexandre Alapetite
1804c0e0bc Filter actions (#2275)
* Draft of filter actions

* Travis

* Implement UI + finish logic

* Travis
2019-03-23 22:52:47 +01:00
Alexandre Alapetite
802c264574 Copy syslog to STDERR (#2208)
* Use openlog before syslog
In order to have a copy on stderr when syslog is not available.

* Take advantage of syslog for actualization
Pipe cron job STDERR and syslog to Docker log
Cf. 00bd467655
2019-01-06 00:46:48 +01:00
Alexandre Alapetite
21e2409b9f Restore old author() functions for extension compatibility (#2030)
Was breaking e.g. https://github.com/kevinpapst/freshrss-dilbert
2018-09-23 16:18:49 +02:00
Alexandre Alapetite
b323ed0846 Improve authors (#2025)
* Links for authors and multiple authors

Favour ';' as a separator instead of ',' to better cope with
multi-author scientific articles.
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/1997 ,
https://github.com/FreshRSS/FreshRSS/issues/1968,
https://github.com/FreshRSS/FreshRSS/pull/2023

* Change i18n authors

* Update layout

* Unicode-compatible search

Example for `author:Loïc`

* author <em> styling

* Final details

* Minor spacing
2018-09-16 10:46:27 +02:00
Alexandre Alapetite
af27b6d300 Tags split improvement (#2023)
* Tags split improvement

Some feeds use a single category with comma-separated tags.
Better handling of tags containing a space

* Handle spaces in searches with +

Can now search in tags containing spaces

* Fix searches with spaces for title and author
2018-09-15 13:06:29 +02:00
Alexandre Alapetite
32d9c3b790 Use mb_strcut (#1996)
* Use mb_strcut

Avoid cutting in the middle of a multi-byte UTF-8 character

* Forgotten php5-*

* Typo

* Whitespace

* More mb_strcut
2018-09-02 13:19:58 +02:00
Alexandre Alapetite
afad1d11af Fix type exception in loadCompleteContent (#1918)
* Fix type exception in loadCompleteContent

https://github.com/FreshRSS/FreshRSS/issues/1917
With some refactoring

* Changelog 1917

https://github.com/FreshRSS/FreshRSS/issues/1917
https://github.com/FreshRSS/FreshRSS/pull/1918
2018-06-05 13:48:34 +02:00
Alexandre Alapetite
ccc62b0a2c Use cURL for GET full content (#1913)
* Use cURL for GET full content

Fix https://github.com/FreshRSS/FreshRSS/issues/1870

* Changelog 1870

https://github.com/FreshRSS/FreshRSS/issues/1870
https://github.com/FreshRSS/FreshRSS/pull/1913
2018-06-02 23:08:09 +02:00
Alexandre Alapetite
4f06b17e00 Extension function to override entry hash (#1707)
Extension function to override entry hash
https://github.com/FreshRSS/FreshRSS/issues/1706
2017-12-03 17:30:02 +01:00
Frans de Jonge
4e174ed9dd [ci] Add Travis (#1619)
* [ci] Add Travis

* Exclude some libs

* Semi-auto whitespace fixes

* line length in SQLite

* Exclude tests from line length

* Feed.php line length

* Feed.php: get rid of unnecessary concat

* Feed.php: line length

* bootstrap.php: no newline at end of file

* Allow concatenating across multiple lines

* Add Travis badge

* do-install line length

* update-or-create-user line length

* cli/create-user line length

* tests/app/Models/SearchTest.php fix indentation

* tests/app/Models/UserQueryTest.php fix indentation

* tests/app/Models/CategoryTest.php fix indentation

* [fix] PHP 5.3 on precise

* cli/do-install no spaces

* cli/list-users line length

* cli/reconfigure line length

* empty catch statements

* api/index line length nonsense

* spaces before semicolon

* app/Models/EntryDAO bunch of indentation

* extra blank lines

* spaces before comma in function call

* testing tabwidth

* increase to 10

* comment out tabwidth line

* try older phpcs version 3.0.0RC4

* line length exception for app/install.php

* proper spaces

* stray spaces in i18n

* Minz/ModelPdo line length

* Minz whitespace

* greader line length

* greader elseif placement

* app/Models/Feed.php spacing in function argument

* ignore php 5.3

* app/Models/ConfigurationSetter.php stray whitespace

* EntryDAOSQLite line length

* I vote for higher max line length =P

* ignore SQL

* remove classname complaint

* line length/more legible SQL

* ignore line length nonsense

* greader line length

* feedController issues

* uppercase TRUE, FALSE, NULL

* revert

* importExportController lowercase null

* Share.php default value not necessary because ! is_array () a few lines down

* CategoryDAO constants should be UPPERCASE

* EntryDAO reduce line length

* contentious autofix

* Allow failures on all versions of PHP except 7.1 because reasons
2017-09-22 12:13:46 +02:00
Alexandre Alapetite
dadd6e7bee Use link instead of title fallback 2017-04-05 14:50:16 +02:00
Alexandre Alapetite
d42a20506b Fallback when GUID is empty
https://github.com/FreshRSS/FreshRSS/issues/1482
2017-04-05 14:44:18 +02:00
Alexandre Alapetite
7f7de31c1d SQL: update request for updated articles
https://github.com/FreshRSS/FreshRSS/issues/798
2015-05-09 13:07:54 +02:00
Alexandre Alapetite
711530a512 SQL: detection of updates, and preparation for better burge
https://github.com/FreshRSS/FreshRSS/issues/798
https://github.com/FreshRSS/FreshRSS/issues/493
SQLite not yet tested. Only MySQL tested so far.
2015-04-04 22:39:31 +02:00
Marien Fressinaud
8a6ad05eba Remove STATE_STRICT
See https://github.com/marienfressinaud/FreshRSS/issues/634
2014-10-22 18:33:46 +02:00
Marien Fressinaud
b5dee73ea0 Coding style
Remove spaces before parenthesis bis

See https://github.com/marienfressinaud/FreshRSS/issues/655
2014-10-05 18:51:08 +02:00
Alexis Degrugillier
71617080e2 Refactor code for strict unread message display
Before, when you choose the show unread message option and the hide categories and feeds options, the categories and feeds weren't hidden. Now it is working properly.
Before, the unread filter icon was not selected with the previous way of using the constants. Now, the filter is highlighted when selected in strict mode.

See #619
2014-09-18 21:15:20 -04:00
Alexis Degrugillier
83832a39c4 Add a new configuration option
Before, when you selected the option to display only unread articles, it shows read articles if no unread article were found.
Now, this option is renamed to include information on fallback behavior and a new option is created to have the "only unread" behavior

See #551

It is missing the german translation
2014-09-06 11:32:52 -04:00
Alexandre Alapetite
b34f59e85a Preparation #3 for SQLite
https://github.com/marienfressinaud/FreshRSS/issues/100
2014-07-03 22:48:29 +02:00
Alexandre Alapetite
d6f4141086 Preparation for SQLite
https://github.com/marienfressinaud/FreshRSS/issues/100
2014-07-03 21:26:30 +02:00
Alexis Degrugillier
3a736e902c Move state constants from Configuration to Entry 2014-04-13 08:16:43 -04:00
Alexandre Alapetite
6f117abfb6 Bugs chargement des articles complets
Corrige https://github.com/marienfressinaud/FreshRSS/issues/365
Ajoute le nettoyage correct du HTML par SimplePie, ainsi que le décodage
des caractères HTML dans l'URL, et enfin un message dans le syslog pour
chaque article téléchargé
2014-01-18 22:54:53 +01:00
Alexandre Alapetite
4d6ab45b03 Micro-optimisation : évite is_null et quelques if/else
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/303
2013-12-30 12:43:39 +01:00
Alexandre Alapetite
2788aaeb1a Problème ctype_digit qui ne marche pas sur des variables qui sont déjà des entiers 2013-12-26 02:50:58 +01:00
Alexandre Alapetite
7b7acf5c87 Synchronisation quelques lignes blanches 2013-12-23 13:35:54 +01:00
Alexandre Alapetite
847de9b329 PHP : performances fonction isDay
Amélioration des performances de Entry->isDay()
2013-12-16 00:54:13 +01:00
Alexandre Alapetite
4ee4f16ffe Problème de casse renommage répertoire 2013-12-15 11:24:14 +01:00