Commit Graph

578 Commits

Author SHA1 Message Date
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
0319cc9d23 Minz allow parallel sessions (#3096)
* Minz allow parallel sessions

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

* Array optimisation

* Array optimisation missing

* Reduce direct access to $_SESSION except in install process

* Fix session start headers warning

* Use cookie only the first time the session is started:
`PHP Warning:  session_start(): Cannot start session when headers
already sent in /var/www/FreshRSS/lib/Minz/Session.php on line 39`

* New concept of volatile session for API calls

Optimisation: do not use cookies or local storage at all for API calls
without a Web session
Fix warning:

```
PHP Warning:  session_destroy(): Trying to destroy uninitialized session
in Unknown on line 0
```

* Only call Minz_Session::init once in our index

It was called twice (once indirectly via FreshRSS->init())

* Whitespace

* Mutex for notifications

Implement mutex for notifications
https://github.com/FreshRSS/FreshRSS/pull/3208#discussion_r499509809

* Typo

* Install script is not ready for using Minz_Session
2020-10-06 23:19:45 +02:00
Alexandre Alapetite
7652369359 Minz: Attach a notification to a request (#3208)
* Minz: Attach a notification to a request

Notifications should be attached to a request, not to a global session.
Fix
https://github.com/FreshRSS/FreshRSS/pull/3096#issuecomment-654891906
Prepare https://github.com/FreshRSS/FreshRSS/pull/3096

* Rename array

* Avoid string constants

Implement
https://github.com/FreshRSS/FreshRSS/pull/3208#issuecomment-703243863

* Improved logic

* Simplify storage

https://github.com/FreshRSS/FreshRSS/pull/3208#discussion_r499511213

* Fix notification bug in configuration/system
2020-10-05 19:03:33 +02:00
Alexandre Alapetite
2f88b26780 Minz: support PHP8 lint (#3207)
* Minz: support PHP8 lint

Fix PHP8 Fatal error: Declaration of MinzPDO::query($statement) must be
compatible with PDO::query(string $query, ?int $fetch_mode = null, mixed
...$fetch_mode_args) in /FreshRSS/lib/Minz/ModelPdo.php on line 159
Errors parsing /FreshRSS/lib/Minz/ModelPdo.php

* Fix argument name

* Please phpcs in Travis
2020-10-03 15:47:58 +02:00
Alexandre Alapetite
8ec2b257df Update SimplePie (PHP8) (#3206)
Contributes to https://github.com/FreshRSS/FreshRSS/issues/3082
Includes https://github.com/FreshRSS/FreshRSS/pull/3180
Differences:
aaad78e6da...692e8bc19b
2020-10-03 15:18:44 +02:00
Prashant Tholia
83166a9f5d lib_phpQuery support PHP 8 (#3186)
* Update to support PHP 8

Replaced create_function calls with anonymous functions in lib/lib_phpQuery.php

Ref Issue: #3082

* Remove commented code blocks

* White space

* More PHP8 fixes

Fix: Fatal error: Array and string offset access syntax with curly
braces is no longer supported in /FreshRSS/lib/lib_phpQuery.php on line
2174, etc.

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2020-10-03 14:26:31 +02:00
Alexandre Alapetite
1c0e7b4feb SimplePie: Fix HTTP 301 permanent redirection (#3180)
* SimplePie: Fix HTTP 301 permanent redirection

When adding feeds it worked fine, but detecting permanent redirects for
existing feeds was sometimes broken (only when PHP open_basedir was not
set).

Indeed, using the built-in CURLOPT_FOLLOWLOCATION instead of the manual
method in SimplePie hides the list of HTTP redirects along the way, and
prevents the distinction of e.g. 301 vs. 302 redirects.

This patch disables CURLOPT_FOLLOWLOCATION in SimplePie, and fixes the
manual method at the same time.
The use of CURLOPT_FOLLOWLOCATION was nevertheless not systematic (only
when open_basedir was not set), so now there is only one logic
independent of open_basedir.

I will send a PR upstream to SimplePie.

How to test: pick a feed with 301 redirection such as HTTP to HTTPS,
e.g. http://ing.dk/rss/term/341
Manually change back to previous address (to simulate a feed that is
changing address)
Refresh feed and observe whether the 301 redirect is obeyed.

* Wrong blank
2020-09-17 10:35:56 +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
Marien Fressinaud
877f5f539b fix: Test setupMigrations doesn't return false (#3113)
`file_put_contents` can return 0 if there’s nothing to write in the
`applied_migrations.txt` file, which is equivalent to `false`. Since
there are no migrations yet, this is what happens. Because this value
(i.e. `0`) is tested next in the `app/install.php` file, the install
script was failing.
2020-07-14 10:25:48 +02:00
Marien Fressinaud
8619cf6fa6 Add a migration system (#2760)
* Add a Minz_Migrator class

Until now, we updated the database structure somewhere in the code but
it wasn't always consistent and somehow complicated to find. Also, this
code was always checked for nothing.

The Migrator aims to improve and ease the creation of migrations. It
should improve the way we apply the updates, making the update server
almost useless.

References:

- example of migration (before Migrator): cc0db9af4f (diff-11a53443fa81512b128c66b065df0679R10)
- update server: https://github.com/FreshRSS/update.freshrss.org
- PR moving the code of the update server to the core: https://github.com/FreshRSS/FreshRSS/pull/1760

* Automatically apply migrations

For now, administrators are used to have nothing to do during an update
else than getting the new code. I suggest to keep this behaviour and
automatically apply migrations if we detect new ones.

Another solution would be to create a CLI command and ask admins to call
it after getting the new code. It could hide migrations errors to end
users, but admin can forget to apply migrations since there are not used
to it.

* Add documentation for Minz Migrator

* Execute migrations even if next ones are applied

* Change mechanism to prevent multiple update at once

* Use mkdir to create the lock and to test it exists

Reference: https://stackoverflow.com/a/731634

* Append .lock to applied_migrations_path

There are no needs to define another file to serve as a lock.

* Change migrations naming convention

* Apply suggestions from code review

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

* Perform a low-cost migration versions comparaison

* Clarify version numbers concerning the migration system

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2020-07-08 12:11:55 +02:00
Alexis Degrugillier
36bda2e715 Add language detection when the user is not logged in (#3022)
Before, when the user was not logged in, pages where translated with the '_' user language.
Now, they are translated with the user preferred language if there is one supported by FreshRSS or with the system default language.
2020-06-05 10:10:46 +02:00
Brooke
d4c98e2637 Updates PHPMailer to 6.1.6 (#3024)
* Update PHPMailer to 6.1.6

Fixes a security issue in PHPMailer 6.1.5 and earlier

* Remove .DS_Store
2020-06-01 12:22:57 +02:00
Alexandre Alapetite
fe1e02dab9 Fix PostgreSQL database auto-create with limited rights (#3013)
* Fix PostgreSQL database auto-create with limited rights

#fix https://github.com/FreshRSS/FreshRSS/issues/3009
Install would fail if the user is not even allowed to connect to the default `postgres` database.

* Confused by custom Minz_PDOConnectionException
2020-05-29 23:55:53 +02:00
Brooke
fa56f90223 Update/php mailer (#2980)
* Update PHPMailer to  6.1.5

This PR update the bundled version of PHPMAiler
2020-05-18 09:42:04 +02:00
Alexandre Alapetite
525e1ca0b0 Relaxed OPML - allow other elements than outline (#2983)
#fix https://github.com/FreshRSS/FreshRSS/issues/2981
Relax OPML
2020-05-16 19:12:42 +02:00
Alexandre Alapetite
11dd6e91b7 Improve logs during cron actualization (#2964)
For
https://github.com/FreshRSS/FreshRSS/issues/2952#issuecomment-626218921
And fix a little bug writing logs with the wrong user name
2020-05-14 21:21:39 +02:00
Eris
2a6f6ee3f3 sort results in find() method (#2874)
* sort results in find() method

* Update lib/lib_phpQuery.php

Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr>
2020-04-04 12:27:48 +02:00
Alexandre Alapetite
9997acd611 Minor SimplePie merge (#2870)
https://github.com/FreshRSS/FreshRSS/pull/2852 was merged upstream
https://github.com/simplepie/simplepie/pull/643
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2814
2020-04-01 22:42:32 +02:00
Alexandre Alapetite
656b61ff29 Fix fetch content for complex HEAD (#2867)
* Fix contentSelectorPreviewAction

Was not compatible with https://github.com/FreshRSS/FreshRSS/pull/2588

* Fix lib_phpQuery for <head ...>

#fix https://github.com/FreshRSS/FreshRSS/issues/2864
* Replace split() by explode() for PHP7 compatibility
https://php.net/str-split
* Fix for document with a `<head>` tag more complicated, like `<head
profile="http://www.w3.org/1999/xhtml/vocab">`
2020-04-01 02:09:08 +02:00
Alexandre Alapetite
e424f45b8c SimplePie use distint cache for force_feed (#2852)
#fix https://github.com/FreshRSS/FreshRSS/issues/2524
In general, we should avoid using the same cache for feeds that are fetched with distinct parameters / settings..
PR upstream to SimplePie https://github.com/simplepie/simplepie/pull/643
2020-03-28 20:24:31 +01:00
Alexandre Alapetite
daa4922d90 Add core extension for Google Groups (#2838)
* Add core extension for Google Groups

#Fix https://github.com/FreshRSS/FreshRSS/issues/2835
Add ability to discover RSS feeds for Google Groups
Based on https://github.com/FreshRSS/FreshRSS/pull/2837

* Allow HTTP in addition of HTTPS
2020-03-22 16:59:39 +01:00
Alexandre Alapetite
cd49e9819b New core-extensions to allow Docker volumes for third-party extensions (#2837)
* New core-extensions to allow Docker volumes for third-party extensions

#Fix https://github.com/FreshRSS/FreshRSS/issues/2650
Split our extensions directory into two:
1) Core extensions shipped with FreshRSS in ./lib/core-extensions/
2) Third-party extensions modified by end-users in ./extensions/ which
can easily be mounted as a Docker volume

* Example of Docker Compose with extensions

* Back-compatibility + fix array merge bug
2020-03-22 16:31:20 +01:00
Alexandre Alapetite
9716071918 SimplePie 1.5.4 (#2814)
https://github.com/simplepie/simplepie/compare/1.5.3..a72e1dfafe7870affdae3edf0d9a494e4fa31bc6
Follow up of the update to 1.5.3
https://github.com/FreshRSS/FreshRSS/pull/2702
Requires PHP 5.6+
https://github.com/FreshRSS/FreshRSS/pull/2527#issuecomment-592952451
2020-02-29 22:29:52 +01: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
94db40a742 Fix PostgreSQL install (#2735)
* Fix PostgreSQL install

Fix https://github.com/FreshRSS/FreshRSS/issues/2732
When username is different from database name

* Add more comments

2b7807d1b3 (r361846714)
2019-12-30 13:17:09 +01:00
Marien Fressinaud
f3d75b3ae5 tec: Improve logs on DB connection failure (#2734)
For a moment, PHP wasn't able to connect to my database. I tried to
understand what happened, unfortunately, the logs were not very helpful
(it basically showed me information that I had in my configuration
file).

I changed the dsn string by the message from the raised exception, I
think it will be more useful.

Other call of Minz_PDOConnectionException are passing error messages
instead of string connection, so I took the opportunity to rename the
constructor argument.
2019-12-25 23:21:12 +01:00
Marien Fressinaud
7802fd33a6 tec: Allow to change CSP header from controllers
For an extension, I needed to call a script from an external domain.
Unfortunately, the CSP headers didn't allow this domain and I had to
patch manually the FreshRSS FrontController for my extension. It's
obviously not a long-term solution since it has nothing to do in the
core of FRSS, and I don't want to apply this patch manually at each
update.

With this patch, I allow changing the CSP header from inside the
controller actions. It allows extensions to modify headers. It's also an
opportunity to remove a bit of code from the FrontController. I wasn't
happy with the previous implementation anyhow.

Reference: https://github.com/flusio/xExtension-Flus/commit/ed12d56#diff-ff12e33ed31b23bda327499fa6e84eccR143
2019-12-22 15:01:02 +01:00
Clemens Neubauer
08c6a1bdc1 Extend hooks (#2704)
It adds two new hooks to have more options for influencing with extensions.
2019-12-07 12:59:53 +01:00
Craig Andrews
ecd00854be Manual update to SimplePie 1.5.3 (#2702) 2019-12-06 18:10:06 +01:00
Alexis Degrugillier
de2b323847 Refacto request class (#2373)
I split the code into more manageable chunks to make it more readable.
It's now easier to get a grasp on it. In the process, I tried to use
the yoda style notation to avoid unintentional variable assignement.
I also tried to exit early to avoid many "if" levels.

I have also added a better way to handle headers and a way to extract
languages from the request. It will be easier to choose which language
to use for i18n.
2019-12-04 08:26:38 +01:00
Craig Andrews
d33c0ff2ca Remove magicQuotesOff (#2697) (#2698)
* Remove magicQuotesOff (#2697)

Magic quotes have been deprecated since PHP 5.4 and as of PHP 7.4 `get_magic_quotes_gpc()` displays a warning.

* Remove unused Minz_Helper::stripslashes_r

`Minz_Helper::stripslashes_r` is no longer used.

It's last user was `Minz_Request::magicQuotesOff`
2019-12-03 22:26:05 +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
f1d1d46651 Fix CLI bug regarding an empty user (#2646)
Fix https://github.com/FreshRSS/FreshRSS/issues/2644
2019-11-08 23:11:35 +01:00
Alexandre Alapetite
22030155f8 Fix database autocreate at install (#2635)
* Fix database autocreate at install

Several bugs prevented the auto-creation of the database in Web and CLI
installs.
Fix
https://github.com/YunoHost-Apps/freshrss_ynh/issues/84#issuecomment-549818408

* initDb

https://github.com/FreshRSS/FreshRSS/pull/2635#discussion_r343107795
2019-11-06 15:16:00 +01:00
Alexandre Alapetite
3c49986ec8 New environment variable COPY_LOG_TO_SYSLOG (#2591)
* New environment variable COPY_LOG_TO_SYSLOG

False by default.
Makes it easy to monitor all logs from Syslog or STDERR (e.g. docker
logs).

* Suggestion of native constants
2019-10-26 11:19:42 +02: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
Robert Kaussow
1b15e22897 add dsnParams to exception log (#2559) 2019-10-05 23:29:41 +02:00
Alexandre Alapetite
77afd1393e Add optional database connection URI parameters (#2552)
#fix https://github.com/FreshRSS/FreshRSS/issues/2549
2019-10-05 15:48:03 +02:00
Alexandre Alapetite
37b52b7361 Trim whitespace (#2544) 2019-10-01 18:12:21 +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
Alexandre Alapetite
c76a318193 CLI to export/import any database to/from SQLite (#2496)
* CLI to export/import any database to/from SQLite

Require PHP 5.5+ https://github.com/FreshRSS/FreshRSS/pull/2495

* Travis

* Execution rights

* Fix wrong static fields

* Fix MySQL bad default buffering

https://stackoverflow.com/questions/6895098/pdo-mysql-memory-consumption-with-large-result-set/6935271#6935271
https://php.net/manual/ref.pdo-mysql

* Fix count on progression

* Avoid static DB information

To ease working with two DBs at the same time

* Less static, simplify

Needs some testing

* Small corrections

* Special case for SQLite to SQLite

* Modify special case for SQLite

* Remove special case for SQLite

More uniform logic for the 3 databases.
Fix wrong DROP TABLE for SQLite.

* Drop indexes

* Revert "Drop indexes"

This reverts commit f28d2bae09.

* Fix deletion

* Fix classic export

* Update cli/README.md

Co-Authored-By: Marien Fressinaud <dev@marienfressinaud.fr>

* Addressing part of review

* Remove goto 😢

* Travis

* Comment for SQLite case

* Fix missing fields when inserting
2019-09-15 21:36:53 +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
6cedeeeae5 Minz: New environment variable to control development mode (#2508)
* New environment variable to control development mode

Suggestion of new enviromnent variable, as discussed
https://github.com/FreshRSS/FreshRSS/pull/2492#issuecomment-523613920

* Update Docker/README.md

Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>

* Update Docker/README.md

Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>

* Update Docker/README.md

Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>

* Declare ENV in Dockerfile

Tested
2019-08-22 20:04:26 +02:00