Commit Graph

200 Commits

Author SHA1 Message Date
Alexis Degrugillier
5bd84038a2 Remove Minz validation (#3439)
It should have been done during #3302.
2021-02-11 18:18:42 +01:00
hesch
13b03b232b refactor: remove referer checks, as they are no longer needed (replaced by csrf tokens) (#3432) 2021-02-11 17:38:39 +01:00
Alexandre Alapetite
8edce0e209 Fix heredoc syntax (#3426)
Fix regression from https://github.com/FreshRSS/FreshRSS/pull/3407

Identifier must not be indented

PHP 5.6.36 (cli) (built: Apr 28 2018 21:14:51)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend
Technologies
PHP Parse error:  syntax error, unexpected end of file in
lib/lib_rss.php on line 608
Errors parsing lib/lib_rss.php
2021-02-06 12:37:26 +01:00
Martin
934f032c19 Better error message on failure (#3407)
* bump default logout from 30 to 365 days

* * Change cookie duration to constant
* Change cookie duration to three months

* use class

* use 90 days (otherwise login form says 91.3 days)

* change class

* also this works now

* Better error message

* inconsistent dot with the other message

* Better error message

* add errorMessage()

* fix style

* html escape the error title

* also html escape error message

* remove spaces before parentheses

* rework the error message

* Minz-friendly

* Update message

Do not advise running this script as wrong user

* Update lib/lib_rss.php

Co-authored-by: Martin <spleefer90@gmail.com>

Co-authored-by: Martin Rys <martin@rys.pw>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-02-05 21:59:21 +01:00
Eris
180ca4d168 Curlopt fixes (#3381)
* sort results in find() method

* Update lib/lib_phpQuery.php

Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr>

* Update lib/lib_phpQuery.php

Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr>

* Fix fetching articles

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-01-17 18:32:24 +01:00
Eris
ee175dd616 CURLOPT parameters per feed (#3367)
* Working curlopt_params

* Examples

* curl_params for fetching the article

* cleanup

* clarification

* Remove debugging

* Options corrected

* Removed Debugging

* i18n not needed (right now)

* Translations and UI rework

* Checks in update.phtml

* Unset Proxy&Cookies

* remove clutter

* minor fuckup

* i18n added properly

* resolve Errors

* linting errors

* linting errors, again

* Review

* Minor revert

* Minor i18n: de

Co-authored-by: maru <maru@nyx.im>
Co-authored-by: Aeris <a3x@eris.cc>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-01-16 22:32:18 +01:00
Alexis Degrugillier
29fe125b4a Add constant for PHP requirements (#3369)
* Add constant for PHP requirements

This new constant is used for PHP version check.
This way, we won't forget to modify some part of the code base.

* Remove PHP version checks

Some checks were obsolete because they were checking unsupported
PHP versions.
2021-01-14 23:28:45 +01:00
Alexandre Alapetite
9c6682e7ed Avoid manual initialisations of system or user configuration (#3070)
* Avoid manual intialisations of system or user configuration

More consistent use of Context

* Simplify FreshRSS_Context::initUser

* Remove a few manual get_user_configuration

* A bit of debugging

* Fix context user init

* Fix install

* Fix concurrency

Concurrent requests could lead to bad race condition

* Fix actualize cron

Fix case when system i initialised several times
2021-01-02 21:20:19 +01:00
Alexandre Alapetite
c246e5d74b Revert "Extract autoloading process (#3283)"
This reverts commit 46cb89adf8.
2020-12-28 19:47:39 +01:00
Alexandre Alapetite
f7d69ad1de SimplePie Strip comments (#3288)
#fix https://github.com/FreshRSS/FreshRSS/issues/3282 (workaround an nginx configuration bug)

We do not need to keep HTML comments in RSS content.
2020-12-28 13:09:14 +01:00
Alexis Degrugillier
46cb89adf8 Extract autoloading process (#3283)
* Extract autoloading process

The process sits in its own file now to ease future improvements.

* Change the autoload process

Before, the autoload process was too restricted. It was really dependant on our
code tree. It was hard to add more classes to be loaded automatically. On top
of that, it did not support autoloading classes following the PSR-4 recommendation.

Now, the autoload process is more open. It supports partially the PSR-4 recommendation,
there is no specific code to load Minz classes or PHPMailer classes. This is the
starting point to reorganize the codebase to introduce long waiting changes as seen
in #789. It would be a nice to later rework the tree, rename classes, and add namespace
in a fashion that follows the PSR-4. Then specific FRSS workarounds in the autoload
could be dropped.
2020-12-26 12:47:39 +01:00
Alexandre Alapetite
f33e261163 Fix sanitize feed description (#3222)
* Fix sanitize feed description

#fix https://github.com/FreshRSS/FreshRSS/issues/3221

* Simplification
2020-10-11 13:32:23 +02:00
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
Alexandre Alapetite
c523f5a4e7 Relaxed to allow underscore _ in URL hostnames (#3133)
* Relaxed to allow underscore _ in URL hostnames

#fix https://github.com/FreshRSS/FreshRSS/issues/3132
https://bugs.php.net/bug.php?id=64948

* Minor fix in favicons redirect

* Minor fix in relative HREF for favicons
2020-07-31 16:33:45 +02:00
Alexis Degrugillier
35eed83b64 Add a way to disable shortcuts (#3114)
When the user do not want to use a shortcut, he can let the shortcut value
empty. This will save an empty configuration thus disabling the shortcut.
The load default action allows to use default shortcut only for disabled
shortcuts.

See #3110
2020-07-14 11:02:30 +02:00
Alexandre Alapetite
2aff347b2e Fix wrong getHeader refactoring (#2749)
* Fix wrong getHeader refactoring

Fix regression introduced by
https://github.com/FreshRSS/FreshRSS/pull/2373
The refactoring required a call to init() even for static functions,
which is most of the time not done.
Removed premature abstraction of `$_SERVER`, which was the root cause of
the bug.
https://github.com/FreshRSS/FreshRSS/issues/2748#issuecomment-569898931

* Refactoring: Move serverIsPublic to Minz_Request

* Add mitigations for wrong configurations

Due to the regression, we have some existing configurations with a bad
base_url

* Forgot one instance
2020-01-04 23:35:42 +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
b0ef856361 Old ICU: INTL_IDNA_VARIANT_2003 fallback (#2680)
* Old ICU: INTL_IDNA_VARIANT_2003 fallback

Fix https://github.com/FreshRSS/FreshRSS/issues/2676
Fix https://github.com/FreshRSS/FreshRSS/issues/2677
ICU version < 4.6: When INTL_IDNA_VARIANT_UTS46 is not available, use INTL_IDNA_VARIANT_2003
Cf. https://github.com/PrestaShop/PrestaShop/pull/11995
2019-11-20 20:43:16 +01:00
Alexandre Alapetite
bec7566429 Sanitize UTF-8 before commiting entries (#2649)
Fix https://github.com/FreshRSS/FreshRSS/issues/2645
2019-11-11 19:48:45 +01:00
Alexandre Alapetite
fdfd8ce9be Workaround for MySQL limitation 1093 (#2586)
* Workaround for MySQL limitation 1093
https://github.com/FreshRSS/FreshRSS/pull/2335#issuecomment-545194606
including minor Travis fixes
2019-10-23 02:12:49 +02:00
Alexis Degrugillier
cc0db9af4f Feature/new archiving (#2335)
* Change archiving config page layout

I've changed some wording and moved actions into a
maintenance section.

* Update purge action

Now we have more control on the purge action. The configuration allows
us to choose what to keep and what to discard in a more precise way.
At the moment, the configuration applies for all feeds.

* Add purge configuration on feed level

Now the extend purge configuration is available on feed level.
It is stored as attributes and will be used in the purge action.

* Update purge action

Now the purge action uses the feed configuration if it exists and
defaults on user configuration if not.

* Add empty option in period list

* Fix configuration warnings

* Add archiving configuration on categories

See #2369

* Add user info back

* Add explanations in UI

* Fixes for SQLite + error + misc.

* Fix invalid feed reference

* Short array syntax

Only for new code, so far

* Fix prefix error

* Query performance, default values

Work in progress

* Fix default values and confirm before leaving

Form cancel and confirm changes before leaving were broken.
And start taking advantage of the short echo syntax `<?= ?>` as we have
moved to PHP 5.4+

* More work

* Tuning SQL

* Fix MariaDB + performance issue

* SQL performance

* Fix SQLite bug

* Fix some attributes JSON encoding bugs

Especially for SQLite export/import

* More uniform, fix bugs

More uniform between global, category, feed settings

* Drop special cases for old articles during refresh

Instead will use lastSeen date with the new archiving logic.
This was generating problems anyway
https://github.com/FreshRSS/FreshRSS/issues/2154

* Draft drop index keep_history

Not needed anymore

* MySQL typo

Now properly tested with MySQL, PostgreSQL, SQLite

* More work for legacy values

Important to avoid overriding user's preference and risking deleting
data erroneously

* Fix PHP 7.3 / 7.4 warnings

@aledeg "Trying to use values of type null, bool, int, float or resource
as an array (such as $null["key"]) will now generate a notice. "
https://php.net/migration74.incompatible

* Reintroduce min articles and take care of legacy parameters

* A few changes forgotten

* Draft of migration + DROP of feed.keep_history

* Fix several errors

And give up using const for SQL to allow multiple database types (and we
cannot redefine a const)

* Add keep_min to categories + factorise archiving logic

* Legacy fix

* Fix bug yield from

* Minor: Use JSON_UNESCAPED_SLASHE for attributes

And make more uniform

* Fix sign and missing variable

* Fine tune the logic
2019-10-23 00:52:15 +02: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
e761202f8a Remove JSON.php fallback (#2528)
After moving to PHP 5.6+ https://github.com/FreshRSS/FreshRSS/pull/2527
it should not be necessary to have the JSON.php fallback anymore, which
was mainly there due to an obscure licensing issue 6 years ago in Debian
https://wiki.debian.org/qa.debian.org/jsonevil , which broke Ubuntu
13.10 https://github.com/FreshRSS/FreshRSS/issues/306
2019-09-18 17:18:36 +02:00
Alexandre Alapetite
38117df976 Require PHP 5.6+
Discussion
https://github.com/FreshRSS/FreshRSS/pull/2495#issuecomment-531911473
Needed for constant arrays
https://www.php.net/manual/en/migration56.new-features.php which will be
used in https://github.com/FreshRSS/FreshRSS/pull/2522
2019-09-17 20:28:07 +02:00
Marien Fressinaud
75632e70f0 Provide email address verification feature (#2481)
* Add an email field to the profile page

I reuse the `mail_login` from the configuration. I'm not sure if it's
useful today (I would say it was used when Persona login was available).

A good improvement would be to rename `mail_login` into `email` so it
would be more intuitive to use.

* Add boolean to the conf to force email validation

This commit only adds a configuration item.

* Add email during registration if email must be validated

* Set email token to validate when email changes

* Block access to FreshRSS if email is not validated

* Send email when address is changed

* Allow to resend the validation email

* Allow the user to change its email while blocked

* Document the email validation feature

* fixup! Allow the user to change its email while blocked

* tec: Autoload PHPMailer lib

* Validate email address format

* Add feedback on validation email resend action

* Allow to logout when user is blocked

* fix: Change default email "from"

* Reorganize i18n keys

* Complete all the locales with default english

* Hide sidebar (profile page) if email is not validated

* Check email requirements on registration

* Allow admin to specify email when creating users

* Don't check email format if value is empty

* Remove trailing comma in userController

Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr>

* Set PHPMailer validator to html5 before sending email

* fixup! Remove trailing comma in userController
2019-08-29 12:02:05 +02:00
Alexandre Alapetite
fd33d92d41 Require PHP 5.5+ (#2495)
* Require PHP 5.5+

https://github.com/FreshRSS/FreshRSS/issues/2469#issuecomment-522255093
I think it would be reasonable to require PHP 5.5+ for the core of
FreshRSS after all.

As Frenzie said, WordPress currently requires PHP 5.6.20+, and it is the
most popular PHP application.

We would loose about 20% of the PHP servers according to
https://w3techs.com/technologies/details/pl-php/5/all but I expect this
number to drop fast after the release of CentOS 8 (CentOS accounts for
17% of Linux servers
https://w3techs.com/technologies/details/os-linux/all/all ).

Distributions:
* no impact on Ubuntu, Fedora, Alpine, OpenWRT, FreeBSD, OpenSuze,
Mageia, as all active versions have PHP > 7
* no impact on OpenSuze, Synology, as all active versions have PHP > 5.5
* we drop Debian 8 Jessie (-2020) - we keep supporting Debian 9 Stretch
(2017-06) - current is Debian 10 Buster
* we drop Red Hat 7 (-2024) - we keep supporting RHEL 8 (2019-05)
* we drop CentOS 7 (-2024) - we will support CentOS 8 (to be released
soonish)

When dropping older versions, I can better like when it is for a good
reason, and there is actually one with PHP 5.5, namely generators
(yield) https://php.net/language.generators.overview which I consider
using.

* Version note for JSON.php

* hex2bin

* Update .travis.yml

Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
2019-08-20 14:55:43 +02:00
Alexandre Alapetite
295cb89af3 Fix PHP 5.5 compat for array const (#2360)
https://github.com/FreshRSS/FreshRSS/issues/2359
2019-04-07 21:39:48 +02:00
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