* Keep the user on login page on failure
* Show an error if username already exists
* Check the password format in the backend
* Return a better message if username is invalid
* Add a title to the login page
* wip: Improve look of login and register pages
* Set a capital M in username help message
On the registration page, username tip started with a minuscule, while
the password tip started with a capital.
* Change message if username is taken
* Better performance with yield
Largely decrease the time to first byte, and reduced memory consumtion.
Before, we used to make several copies in memory of the whole list of
articles before sending them to the client. Now streamed as they are
processed.
* Travis
* No pre for enclosure-description
#fix https://github.com/FreshRSS/FreshRSS/issues/2807
In browsers, the styling `white-space:pre-line` will be applied by CSS,
but no styling will be done for clients via API.
* Corresponding CSS change
- 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>
This fix makes the authors part of the "title item", so it's not
considered as another block. This is not perfect since authors will
disappear on small screens, but we can discuss of putting titles on
multi-lines (see https://github.com/FreshRSS/FreshRSS/issues/2344)
The `FreshRSS_Auth::hasAccess` method is called during auth
initialization (`app/FreshRSS.php:78`), only for `user#create` action.
However, at this step, the `user` configuration namespace hasn't be
initialized yet, and so users weren't able to register because of the
exception... quite critical!
* Pass the entries to 'entry_before_display' extension hook. - #2762
* Fix code-style.
* - Fix 'Whitespace found at end of line'.
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Now FRSS supports more than one admin. Admins have the same rights as
the default user. Admins can promote or demote other users. The default
user is considered as an admin even if it does not have the admin flag
enabled.
See #2096
The main reason for this checklist is to not forget about documentation,
and to encourage us to write more tests. I hope it'll help us to improve
both!
* 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
* 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
I published an article via WebSub, but I never received it. So I checked
my logs to find why and I found the following stacktrace:
```
29/Dec/2019:15:58:32 +0000 "POST /api/pshb.php" 500
NOTICE: PHP message: PHP Fatal error: Uncaught Error: Call to undefined function _t() in /path/app/Models/Category.php:83
Stack trace:
/path/app/Models/CategoryDAO.php(417): FreshRSS_Category->_id(1)
/path/app/Models/CategoryDAO.php(192): FreshRSS_CategoryDAO::daoToCategory(Array)
/path/app/Models/Feed.php(466): FreshRSS_CategoryDAO->searchById('1')
/path/app/Controllers/feedController.php(416): FreshRSS_Feed->cleanOldEntries()
/path/p/api/pshb.php(141): FreshRSS_feed_Controller::actualizeFeed(0, 'https://flus.io...', false, Object(SimplePie))
{main}
thrown in /path/app/Models/Category.php on line 83
```
The `_t` function should be loaded with the Minz_Translate class, but
the latter isn't initialized on WebSub endpoint.
In my opinion, we should not have to care about this kind of detail of
implementation and it reveals a deeper architectural misconception, but
for now the fix should be enough. It’s quite difficult to reproduce
locally though.
* tec: Add a test target to Makefile
Minor edit put php7-phar on third line
I try to keep on the third line the Alpine-specific PHP extensions (i.e.
that are not by default in Ubuntu), and in alphabetic order
Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr>
* Allow to run make test without Docker
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.
* Rework the travis file to enable PHPUnit
I realized that unit tests weren't executed on Travis. While working on
this file to enable these tests, I started to think we could simplify
it.
I separated jobs so:
- PHP linter and tests are only performed on PHP 7.3
- Translations are tested separatly so they can fail (it was already the
case but it was hard to understand the way it was done)
- PHP 5.6 only checks syntax issues
- the last job checks css, js, etc. (it didn't change)
PHPUnit is not executed on 5.6 because only the version 5 is available
while the latest version is the 8 (https://phpunit.de/supported-versions.html).
I think it's easier to read (each job is more explicit) but I'm not a
Travis expert so maybe there's some room for improvements.
* Fix failing tests
The category `_name` regression was introduced in commit b323ed084.
I wasn't able to understand when and why Search tests was wrong.
The rest is about upgrade of PHPUnit.
The constant was badly named. The bug was introduced in 3c49986ec,
probably because of a copy/paste.
There is no other occurrences of COPY_LOG_TO_STDERR in the code (checked
with `git grep`).
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
* Change default TAG in Makefile
We are going to drop the `dev` branch. The Docker tag `dev-*` are based
on this branch and so there will be no longer be generated. We must use
images based on the `master` branch (i.e. `latest`, `alpine` and `arm`).
* Remove references to dev branch in documentation
* Synchronize French documentation
I'm currently playing with a small extension to improve the email sharing
system. It allows to create a message and send an email directly through
FreshRSS. For that, I need to retrieve the shared article. I could use
the link or the title but it would be less robust and less efficient.
Reference: https://github.com/FreshRSS/FreshRSS/issues/300