Commit Graph

53 Commits

Author SHA1 Message Date
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
Marien Fressinaud
89427e45e5 Clean access checks on userController (#2471)
The access was checked several times in some actions and had incoherent
behaviours. Also, the `firstAction` condition was a bit tricky to
understand.

This PR duplicates conditions across all the controller actions and
remove the `firstAction` which becomes useless.
2019-07-31 13:52:20 +02:00
Alexis Degrugillier
7f1ff77f25 Allow email as username (#2407)
* Allow email as username

Before, it was possible to register email as username on cli but not in the
interface. This was caused by a bug in the pattern which was not working as
expected. If your input was "user@example.com", the PHP verification was
catching only "user" and was acting like the whole thing was catched. But
on the interface, the catching was unsuccesful.
Now, the catching should be working properly.

I needed to add "$|^" in the pattern because without, I was catching either
the beginning of a string either the last char. This was introduced as a
workaround for IE/Edge pattern matching on April 27, 2017. See #1511 for
more information.

I tested it only on FF. Tests on other browsers wanted.

See #2391

* Relax and fix username check

Allow @ + -

* Remove + for now

https://github.com/FreshRSS/FreshRSS/pull/2407#issuecomment-502469137
2019-06-16 20:10:01 +02:00
Alexandre Alapetite
ebd8c31c02 Rework CSRF interaction with sessions (#2290)
* Rework CSRF interaction with sessions

Fix https://github.com/FreshRSS/FreshRSS/issues/2288
Improve security in some edge cases
Maybe relevant for
https://github.com/FreshRSS/FreshRSS/issues/2125#issuecomment-474992671

* Forgotten mime type
2019-03-22 19:05:38 +01:00
Alexandre Alapetite
2374374ba9 Less jQuery (#2234)
* Less jQuery

Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2199

* Even less jQuery + global view unread title fix

* Even less jQuery

* Yet even less jQuery

* Even less jQuery

* Reduce some events

* Even less jQuery

* jQuery gone from main view

+Fixed English i18n

* Fix feed folded view

* Remove Firefox 64 workaround

Remove workaround for Gecko bug 1514498 in Firefox 64, fixed in Firefox
65

* Split to extra.js

Avoid loading unneeded JavaScript code for the main view.
+ several adjustements

* Improve CSS transition fold category

* Rewrite shortcuts

Remove library. Much faster, shorter, one listener instead of many.
Control of the shortcut context.
Fix https://github.com/FreshRSS/FreshRSS/issues/2215

* Remove debug

* Minor syntax

* Filter out unwanted shortcut modifiers

* Menu overflow fix

* Typo

* Fix unfolding in mobile view

* Remove jQuery from category.js

* Remove jQuery from Global view
2019-02-13 15:06:28 +01:00
Alexandre Alapetite
6a686daafa Allow dot in username (#2062)
* Allow dot in username

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

* Missing quotes for special chars in PostgreSQL
2018-10-24 13:07:39 +02:00
Alexandre Alapetite
46510febf1 Improved flow for password change (#2057)
https://github.com/FreshRSS/FreshRSS/issues/2056
2018-10-21 16:33:28 +02:00
Alexandre Alapetite
c8b54ae807 Fix MySQL create table feeds (#2047)
https://github.com/FreshRSS/FreshRSS/issues/2042
2018-10-14 13:48:59 +02:00
Marien Fressinaud
44ee5ec70c [#1928] Login user automatically after creation (#1941) 2018-06-18 22:55:41 +02:00
Alexandre Alapetite
4ff6613989 Fix CLI for creating/deleting user with Fever API (#1896)
* Fix CLI for creating user with Fever API

https://github.com/FreshRSS/FreshRSS/pull/1836

* Fix CLI for deleting user with Fever API

https://github.com/FreshRSS/FreshRSS/pull/1836
2018-05-26 11:44:17 +02:00
Kevin Papst
8f1bad60d0 Add Fever API and user documentation (#1836)
* added fever api and documentation

* spaces to tabs

* fixed code format

* added links

* added utf8 to header

* removed XML support

* removed before check, as we have to convert it afterwards

* added sandboxed setting (currently disabled)
added support for extensions using entry_before_display

* listFeedsOrderUpdate LIMIT

https://github.com/FreshRSS/FreshRSS/pull/1836/files#r175287881

* removed custom sql by using FreshRSS_FeedDAO::listFeedsOrderUpdate()

* fixed mark all as read

* replaced custom sql for getUnread() and getStarred() with dao functions

* removed sanitization functions

* Rework fever login

* Fix config bug

Plus documentation

* Fix array syntax

For compatibility with PHP 5.3

* Disable cookies and session for API

* Fix currentUser

* added response header and error log

* adjusted phpdoc to match new authentication

* Mechanism to delete old keys

* replace PHP_INT_MAX with zero to disable limit

* replace method_exists with check for explicit methods

* removed Press support and smaller refactoring + updated docu

* Rewrite bindParamArray

Avoid one of the SQL injection risks

* Docs and readme

* Fix API link

* Simplify reverse key check

Using userConfig
2018-05-24 21:53:47 +02:00
Kevin Papst
6cda39a2f1 fix update user for empty username (#1857) 2018-04-06 20:52:33 +02:00
Alexis Degrugillier
4be15d5b40 Fix notice when managing user (#1785)
See #1765 & #960
2018-02-14 22:31:15 +01:00
Alexis Degrugillier
ac3e38359b Allow admin user to reset passwords (#1765)
See #960
2018-02-14 22:15:34 +01:00
Alexandre Alapetite
f632a34626 CLI optimize database (#1663)
CLI optimize database https://github.com/FreshRSS/FreshRSS/issues/1583
And VACUUM in SQLite https://github.com/FreshRSS/FreshRSS/issues/918
Add VACUUM for PostgreSQL (Not tested yet)
2017-10-12 20:11:06 +02:00
Alexandre Alapetite
e046791c93 CLI update user
https://github.com/FreshRSS/FreshRSS/issues/1600
Not tested
2017-07-22 20:05:36 +02:00
Alexandre Alapetite
1e5b151d88 Work around for IE / Edge pattern bug
Swap order of regex alternatives
https://github.com/FreshRSS/FreshRSS/issues/1511

http://stackoverflow.com/questions/22360235/do-browsers-support-different-html5-pattern-regexp-features

https://connect.microsoft.com/ie/feedback/details/836117/regex-bug-in-pattern-validator
2017-04-27 20:25:26 +02:00
Alexandre Alapetite
510045b3c5 Merge branch 'FreshRSS/dev' into multiuser-token 2017-04-10 19:46:22 +02:00
Alexandre Alapetite
535aa35ba7 PSHB better unsubscribe
Cases when a user is deleted, or when a feed is deleted.
Removed random key do reduce the risk of subscribing several times to
the same PSHB feed.
2017-04-10 19:09:21 +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
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
0bd4b2c742 Changelog 1423 2017-02-25 13:08:06 +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
Clément
648fcb63b5 correct check username pattern 2017-02-19 15:00:26 +01:00
Clément
4eeae5171b use function with preg_match to check username 2017-02-16 18:54:59 +01:00
Clément
8d2b76334c Possibility to register user having a '-', a '_' or a '.' in username 2017-02-16 14:27:45 +01:00
Alexandre Alapetite
1182129ce5 CLI option no-default-feeds
https://github.com/FreshRSS/FreshRSS/issues/1095
2016-10-24 20:29:08 +02:00
Alexandre Alapetite
ab4ece6780 CLI do-install
https://github.com/FreshRSS/FreshRSS/issues/1095
https://github.com/FreshRSS/FreshRSS/issues/1090
2016-10-24 01:41:09 +02:00
Alexandre Alapetite
5b1b43ab57 CLI delete user https://github.com/FreshRSS/FreshRSS/issues/1095 2016-10-22 20:32:16 +02: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
f81c441920 Fix bug language option for new user
https://github.com/FreshRSS/FreshRSS/issues/1273
2016-10-04 21:06:37 +02:00
Alexandre Alapetite
c1548e732d Remove Mozilla Persona login
https://github.com/FreshRSS/FreshRSS/issues/1052
2016-07-31 14:58:19 +02:00
Alexis Degrugillier
269c6b88c4 Add a system configuration page
It allows to modify system configuration from the interface. At the moment, only limits are modifiable. The user limit was removed from the user page and added here along with categories and feeds limits.
2015-08-22 09:33:58 -04:00
Marien Fressinaud
8751c344f3 Ask password to user before deleting its account
See https://github.com/FreshRSS/FreshRSS/issues/679
2015-07-22 22:58:00 +02:00
Marien Fressinaud
3a929138b0 Give possibility to delete its own account
See https://github.com/FreshRSS/FreshRSS/issues/679
2015-07-22 14:22:26 +02:00
Marien Fressinaud
02c3546440 Registration action is handled and create a user
See https://github.com/FreshRSS/FreshRSS/issues/679
2015-07-22 13:52:03 +02:00
Marien Fressinaud
9fca5c70f3 Add some comments 2015-07-22 12:20:00 +02:00
Marien Fressinaud
ac8bd3d251 Add a max_registrations limit
- Allow user to create accounts (not implemented)
- Admin only can set this limit

See https://github.com/FreshRSS/FreshRSS/issues/679
2015-07-21 15:31:23 +02:00
Marien Fressinaud
ff1e989de1 Fix a call to availableLanguages() (bad object)
See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-06 22:14:14 +01:00
Marien Fressinaud
eff804572f Fix setters on $user_conf
Old setters does not exist anymore, remove them.

See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-06 21:54:46 +01:00
Marien Fressinaud
d3a93ea290 BREAKING FEATURE: Remove general in config
General attribute has been removed from system config.
Now subattributes (e.g. environment, salt, title, etc.) are directly accessible.

YOU HAVE TO FIX YOUR ./data/config.php file!

- Remove the general array
- Values inside this array must be kept
- To see what it must look like, please have a look to ./data/config.default.php
  (but keep your values!!).

See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-06 18:53:36 +01:00
Marien Fressinaud
d27efeec04 Fix Controllers to use the correct config system
See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-06 17:38:31 +01:00
Marien Fressinaud
7cca47d1ab Change name of user configuration var in Context
- FreshRSS_Context::$conf is replaced by FreshRSS_Context::$user_conf
- Introduce FreshRSS_Context::$system_conf
- Remove FreshRSS_Configuration object

See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-05 22:45:03 +01:00
Marien Fressinaud
b5bee85603 BREAKING FEATURE: move user data
- Create ./data/users/ folder
- Move user configuration to ./data/users/username/config.php
- Move sqlite db to ./data/users/username/db.sqlite
- Move user logs to ./data/users/username/log.txt

See https://github.com/FreshRSS/FreshRSS/issues/729
2014-12-21 13:10:02 +01:00
Marien Fressinaud
59fc73baa9 Fix i18n for update and user controllers 2014-12-11 19:32:59 +01:00
Marien Fressinaud
58deab37cd Fix Minz_Error::error() -> use default values 2014-10-30 19:57:08 +01:00
Alexandre Alapetite
9f97f7df88 Ne pas rafraîchir les flux des utilisateurs non logués depuis x jours
https://github.com/marienfressinaud/FreshRSS/issues/681
Warning: needs some testing
2014-10-29 00:45:42 +01:00
Marien Fressinaud
5d6407a0bf Update i18n
- Fix i18n strings
- Fix typo profil -> profile

See https://github.com/marienfressinaud/FreshRSS/issues/678
2014-10-26 12:22:13 +01:00
Marien Fressinaud
1a22a87fb1 Use FreshRSS_Context::$conf only
- Replace $this->view->conf in controllers
- Replace $this->conf in views
2014-10-20 18:45:22 +02:00
Marien Fressinaud
5797344aff Fix a bug to get size of user (SQLite) 2014-10-17 16:24:21 +02:00