Commit Graph

173 Commits

Author SHA1 Message Date
Alexandre Alapetite
912480fab8 Ensure sanitizeHTML gets a string (#2351)
Regression triggered by https://github.com/FreshRSS/FreshRSS/pull/2228
2019-04-06 16:07:19 +02:00
Alexandre Alapetite
d9e246ecf7 Shortcuts legacy (#2320)
Fix https://github.com/FreshRSS/FreshRSS/issues/2316
2019-04-02 00:08:51 +02:00
Alexis Degrugillier
f2925594c7 Add header to cli (#2296)
* Add header to cli

Now there is a switch to display the header on user info.
While doing that, I've changed how the command is working to display
all users by default and to accept more than one user at once.
I also changed the display to make it more pleasing.

As this command displays all users by default. I wonder if we still
need the list user command.

See #2294

* Minor format
2019-03-23 23:17:22 +01:00
Alexandre Alapetite
834ffacce2 No old ID (#2276)
* No old ID

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

* PostgreSQL insert or ignore
2019-03-19 20:14:31 +01:00
Alexandre Alapetite
b73d4c807f COPY_SYSLOG_TO_STDERR (#2213)
Update of https://github.com/FreshRSS/FreshRSS/pull/2208
Fixes https://github.com/FreshRSS/FreshRSS/issues/2212
2019-01-08 00:06:01 +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
945cf832ad HTTP authenfication fixes (#2204)
* Security fixes when HTTP user does not exist in FreshRSS
* Accept HTTP header X-WebAuth-User for delegated HTTP Authentication (e.g. Træfik)
* Document delegated HTTP authentication from https://github.com/FreshRSS/FreshRSS/pull/2202
2019-01-02 21:43:05 +01:00
Alexandre Alapetite
9f6919ae81 Strip embedded SVG images for now (#2135)
Fix https://github.com/FreshRSS/FreshRSS/issues/2106
Proper SVG support would require custom sanitizing and URL rewriting of
xlink:href, and is left for future work
2018-11-18 11:35:13 +01:00
Alexandre Alapetite
0fce9892ff API encoding tuning (#2120)
Use only minimal XML->Unicode encoding for articles title.
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2093
2018-11-12 09:03:20 +01:00
Alexandre Alapetite
b672fc190d Tweaks for Vienna RSS (#2093)
* Tweaks for Vienna RSS

https://github.com/FreshRSS/FreshRSS/issues/2091
https://github.com/ViennaRSS/vienna-rss/issues/1197

* Fix get feed by URL

* Fix get item ids returning starred elements

* API add item ids by feed URL

* Add API filter `it`

https://feedhq.readthedocs.io/en/latest/api/reference.html#stream-items-ids

* API add `nt=` filter + refactoring

* No ; prefix for author

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435562495

* Add id long form prefix and accept short id form

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435631259

* Fix quote problem

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435683930

* Isolate bug fix for News+

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435687041

* Rework encoding conventions

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-437441834

* Unicode escaping alternative

Alternative approach to encode XML special characters and other
problematic characters into their Unicode fullwidth version when we
cannot use HTML-encoding because clients disagree wether they should
HTML-decode or not.
https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-436059559
2018-11-11 17:31:50 +01:00
Alexandre Alapetite
1f4dc71d95 Fix public IP detection (#2084)
* Fix public IP detection

gethostbyname() may not return the expected public IP in a container
deployment or behind a proxy.
https://github.com/FreshRSS/FreshRSS/pull/2010/files#r228714764
Might have set to false `pubsubhubbub_enabled` some installations made
from stratch from version 1.11.2.

* Changelog 2084
2018-10-27 17:19:08 +02:00
Alexandre Alapetite
8ee8a573f1 Custom labels (#2027)
* First draft of custom tags

https://github.com/FreshRSS/FreshRSS/issues/928
https://github.com/FreshRSS/FreshRSS/issues/1367

* SMALLINT to BIGINT for id_entry

And uppercase SQL types

* Fix layout for unreads

* Start UI menu

* Change menu order

* Clean database helpers

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r217971535

* Travis rules do not understand PostgreSQL constants

Grrr

* Tag controller + UI

* Add column attributes to tags

* Use only favicon for now, for label

* Fix styling for different themes

* Constant for maximum InnoDB index length in Unicode

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r219052200
(I would have personnally prefered keeping the readability of a real
value instead of a constant, in this case of many SQL fields)

* Use FreshRSS_Factory::createCategoryDao

* Add view of all articles containing any tag

* Fix search in tags

* Mark as read tags

* Partial auto-update unread tags

* More auto update tag unreads

* Add tag deletion

* Do not purge tagged articles

* Minor comment

* Fix SQLite and UI bug

* Google Reader API support for user tags

Add SQL check that tag names must be distinct from category names

* whitespace

* Add missing API for EasyRSS

* Compatibility SQLite

Problematic parentheses

* Add SQL DISTINCT for cases with multiple tags

* Fix for PostgreSQL

PostgreSQL needs some additional type hint to avoid "could not determine
data type of parameter $1"

http://www.postgresql-archive.org/Could-not-determine-data-type-of-parameter-1-tp2171092p2171094.html
2018-09-29 20:47:17 +02:00
Alexandre Alapetite
aafb1cd0e4 Better test if server has public address (#2010)
* Better test if server has public address

* Wrong trailing slash in documentation
2018-09-09 00:50:24 +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
6a56894e94 New extension event + Tumblr GDPR (#1924)
* New extension event + Tumblr GDPR

https://github.com/FreshRSS/FreshRSS/issues/1894
simplepie_before_init event

* Refactor extension enabling + Tumblr GDPR enabled by default

Add possibility for extensions to be enabled by default, and disabled
back by users.

* Minor whitespace
2018-06-09 15:58:18 +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
b552abb332 JSON column for feeds (#1838)
* Draft of JSON column for feeds
https://github.com/FreshRSS/FreshRSS/issues/1654

* Add some per-feed options
  * Feed cURL timeout
  * Mark updated articles as read https://github.com/FreshRSS/FreshRSS/issues/891
  * Mark as read upon reception https://github.com/FreshRSS/FreshRSS/issues/1702
  * Ignore SSL (unsafe) https://github.com/FreshRSS/FreshRSS/issues/1811

* Try PHPCS workaround
While waiting for a better syntax support
2018-05-01 17:02:11 +02:00
Nico B
dfc638dd98 [fix] Login: HTTP Auth when internal redirects occur (#1772)
When Apache performs an internal redirect, it stores the username in the
REDIRECT_REMOTE_USER variable instead of REMOTE_USER, breaking HTTP
authentication. For more information, see this Stack Overflow
discussion:
<https://stackoverflow.com/questions/3050444/when-setting-environment-variables-in-apache-rewriterule-directives-what-causes>

This commit first tries REMOTE_USER, as before. If it is not set, it checks whether REDIRECT_REMOTE_USER is set.
2018-01-22 15:12:44 +01:00
Alexandre Alapetite
52d0988655 Use __DIR__ for relative include and require
For uniformity, and to avoid having PHP searching in include_path.
http://php.net/manual/function.include.php
https://github.com/FreshRSS/FreshRSS/pull/1715
https://github.com/FreshRSS/FreshRSS/pull/1711#issuecomment-350581350
2017-12-11 21:11:34 +01:00
Alexandre Alapetite
7490dfdc42 Merge pull request #1700 from candrews/patch-1
Call idn_to_ascii with INTL_IDNA_VARIANT_UTS46
2017-12-02 14:10:09 +01:00
Alexandre Alapetite
1cf545342e Remove forgotten punycode line 2017-12-02 14:03:19 +01:00
Craig Andrews
aea78f4d99 Call idn_to_ascii with INTL_IDNA_VARIANT_UTS46
Under PHP 7.2, calling `idn_to_ascii($idn)` results in a deprecation warning: 'INTL_IDNA_VARIANT_2003 is deprecated'
See https://secure.php.net/manual/en/function.idn-to-ascii.php 

Therefore, if possible, `idn_to_ascii($idn, 0, INTL_IDNA_VARIANT_UTS46)` should be used instead. `INTL_IDNA_VARIANT_UTS46` was introduced in PHP 5.4, so on versions before that, `idn_to_ascii($idn)` must still be used.

Fixed #1699
2017-12-01 18:42:15 -05:00
Olivier DOSSMANN
d651c41e0c [FIX] #1690 - Also check pdo_pgsql extension in check_install() 2017-11-18 09:38:20 +01:00
Alexandre Alapetite
4058ff3ff4 Remove SimplePie name from HTTP User-Agent string
https://github.com/FreshRSS/FreshRSS/issues/1622#issuecomment-334928486
https://github.com/FreshRSS/FreshRSS/issues/1627
https://github.com/FreshRSS/FreshRSS/issues/1607
2017-10-07 13:51:45 +02:00
Alexandre Alapetite
f293cec492 HTML5 show controls audio video (#1642)
* HTML5 show controls audio video

* Changelog 1642
2017-09-26 22:19:18 +02: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
a72ad940df Increase minimal support to PHP 5.3.8+
https://github.com/FreshRSS/FreshRSS/issues/1604
2017-08-21 12:29:12 +02:00
Alexandre Alapetite
dd65cb0f9c Manual merge upstream SimplePie 2017-05-28 02:02:21 +02:00
Alexandre Alapetite
e4ffbd3dad Move force-https.default.txt 2017-05-13 00:05:19 +02:00
Alexandre Alapetite
af8960b8b3 Move default configuration files
https://github.com/FreshRSS/FreshRSS/issues/1531
2017-05-12 23:33:58 +02:00
Alexandre Alapetite
0ce43be9de Multi-user token
https://github.com/FreshRSS/FreshRSS/issues/1390
https://github.com/FreshRSS/FreshRSS/issues/366
2017-04-09 00:25:04 +02:00
Alexandre Alapetite
2818c72f5a Changelog CLI
https://github.com/FreshRSS/FreshRSS/issues/1443
https://github.com/FreshRSS/FreshRSS/pull/1444
https://github.com/FreshRSS/FreshRSS/issues/1445
https://github.com/FreshRSS/FreshRSS/pull/1447
https://github.com/FreshRSS/FreshRSS/issues/1448
https://github.com/FreshRSS/FreshRSS/issues/1449
2017-03-04 11:53:57 +01:00
Alexandre Alapetite
9c012e6c81 Fix SQLite CLI install
https://github.com/FreshRSS/FreshRSS/issues/1445
https://github.com/FreshRSS/FreshRSS/issues/1443
https://github.com/FreshRSS/FreshRSS/issues/1443
2017-03-02 22:57:02 +01:00
Alexandre Alapetite
972cd0b908 Merge pull request #1441 from Alkarex/Sanitize-Website-URL
Sanitize Web site URL
2017-02-28 21:16:55 +01:00
Alexandre Alapetite
271a1fdc89 Missing checkUsername and const patten
https://github.com/FreshRSS/FreshRSS/pull/1423

https://github.com/YunoHost-Apps/freshrss_ynh/issues/27#issuecomment-279792363
2017-02-25 12:39:08 +01:00
Alexandre Alapetite
8a6b381154 Sanitize Web site URL
https://github.com/FreshRSS/FreshRSS/issues/1434
2017-02-25 11:51:54 +01:00
Alexandre Alapetite
b28b6a4bf2 extension_loaded fileinfo
https://github.com/FreshRSS/FreshRSS/issues/1375
2016-11-20 16:52:07 +01:00
Alexandre Alapetite
6b85f8cf12 CLI: IEC prefix (binary) for units
Updated according to https://wiki.ubuntu.com/UnitsPolicy
(I got confused due `ls`, which is still using 1024 but is listed as an
exception)
And use the formatting function already included in FreshRSS
2016-11-05 21:32:08 +01:00
Alexandre Alapetite
e1f214e9e2 CLI list-users and create-user
https://github.com/FreshRSS/FreshRSS/issues/1095
https://github.com/FreshRSS/FreshRSS/issues/1090
2016-10-22 12:58:06 +02:00
Alexandre Alapetite
7f2b0439ec Extract function safe_ascii() 2016-10-20 01:38:23 +02:00
Alexandre Alapetite
6bc37cef47 W3C resource-priorities have been abandonned
https://github.com/FreshRSS/FreshRSS/issues/1222
2016-10-08 21:45:47 +02:00
Alexandre Alapetite
0a79d4085b Refactor controller for actualize feed 2016-09-24 20:43:52 +02:00
Alexandre Alapetite
2bf35b23f5 Merge dev conflicts 2016-08-14 22:44:49 +02:00
Alexandre Alapetite
dd7d5855e3 Remove code for PHP 5.3.2- 2016-08-14 19:55:27 +02:00
Alexandre Alapetite
46bcaf5f9d Define JSON_UNESCAPED_UNICODE for PHP 5.3
https://github.com/FreshRSS/FreshRSS/issues/1208
2016-08-14 19:34:44 +02:00
Alexandre Alapetite
e6fd34bdda CSRF token, update HTTP Referrer policy to same-origin
https://www.w3.org/TR/referrer-policy/#referrer-policy-no-referrer
https://github.com/FreshRSS/FreshRSS/issues/570
https://github.com/FreshRSS/FreshRSS/issues/955
https://github.com/FreshRSS/FreshRSS/issues/1198
https://github.com/FreshRSS/FreshRSS/issues/565
https://github.com/FreshRSS/FreshRSS/issues/554
2016-08-13 17:49:31 +02:00
Alexandre Alapetite
c1548e732d Remove Mozilla Persona login
https://github.com/FreshRSS/FreshRSS/issues/1052
2016-07-31 14:58:19 +02:00
Alexandre Alapetite
b042d3a772 HTTP2 optimization
Fast flush HTTP headers, push promise CSS.
Requires PHP 5.3+ due to anonymous function.
Do not load syles, scripts, and notifications for Ajax requests.
https://github.com/FreshRSS/FreshRSS/issues/1089
2016-04-23 19:10:32 +02:00
Alexandre Alapetite
1e644b6470 Merge pull request #1087 from Alkarex/HTTPS_Everywhere
Force HTTPS for selected embed providers
2016-02-29 17:47:05 +01:00