Commit Graph

60 Commits

Author SHA1 Message Date
rupak
85f14f92fd Message for closed registration (#8462)
* Add closed msg field

i18n

fix

* Display based on registration type

* Save as FreshRSS_Context::systemConf()->closed_registration_message instead

* Improve messages

* Revert unrelated changes

* make fix-all

* Minor whitespace

* Simplify logic

* Fix invalid use of empty() and sympler syntax

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-01-24 15:31:43 +01:00
Inverle
6d2bb24b37 Move unsafe autologin to an extension (#7958)
Completes the following TODO https://github.com/FreshRSS/FreshRSS/issues/7923:

de624dc8ce/app/Controllers/authController.php (L105)

Extension PR: https://github.com/FreshRSS/Extensions/pull/364

https://github.com/FreshRSS/Extensions/tree/main/xExtension-UnsafeAutologin
2025-12-04 20:10:20 +01:00
Alexandre Alapetite
a18c35046d Housekeeping lib_rss.php (#8193)
* Housekeeping lib_rss.php
`lib_rss.php` had become much too large, especially after https://github.com/FreshRSS/FreshRSS/pull/7924
Moved most functions to other places.
Mostly no change of code otherwise (see comments).

* Extension: composer run-script phpstan-third-party
2025-11-11 08:17:12 +01:00
Alexis Degrugillier
72884813e1 Add hook enums (#8036)
- add an enum to handle hook types (enum are available since PHP 8.1)
- change hook calls from string value to enum value
2025-09-30 22:59:41 +02:00
Inverle
ddb51c0e95 Fix another user self-delete regression (#7877)
Regression from #7763 
Earlier regression which was fixed before #7626

In addition:
* get rid of `data-toggle` (refactor)
* show invalid login message if deleting account and entered incorrect password instead of redirect to 403
* remove unused reference to `r` parameter
* `forgetOpenCategories()` on login not on any crypto form
2025-09-15 22:17:14 +02:00
Inverle
d9197d7e32 New JS attribute: data-auto-leave-validation (#7785)
Instead of a repeating pattern like: `<input type="text" value="something" data-leave-validation="something">`, you can now put a `data-auto-leave-validation="1"` attribute on a `<form>` for example, and it will automatically set the `data-leave-validation` attributes inside the form elements.

`data_auto_leave_validation(parent)`  from `extra.js` is called on slider open and page load.

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2025-08-08 17:39:38 +02:00
Inverle
3ce64d271b Implement sudo mode / reauthentication (#7753)
* Implement sudo mode / reauthentication

* i18n: fr

* generate flags

* Improvements

* Remove HMAC check
* Don't require reauth to access logs when signed in as admin
* Notify user of bad login via notification instead

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-07-31 13:53:14 +02:00
Inverle
e33ef74af9 before_login_btn hook + system conf attributes (#7761)
* `before_login_btn` hook + system conf attributes

* phpstan fix

* Refactoring

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-07-30 08:03:04 +02:00
maTh
27c2e2490a templates and i18n: link back to rss feeds (#7162) 2024-12-29 23:45:50 +01:00
Luc SANCHEZ
15745d42b7 Upgrade code to php 8.1 (#6748)
* revert
Fix code indentation
Fix code

Upgrade code to php 8.1

* fix remarques

* code review

* code review

* code review

* Apply suggestions from code review

* code review

* Fixes

* Many remainging updates of array syntax

* Lost case 'reading-list'

* Uneeded PHPDoc

---------

Co-authored-by: Luc Sanchez <l.sanchez-prestataire@alptis.fr>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-11-28 17:11:04 +01:00
laxmanpradhan
77108ea19e Authentik oAuth setup documentation updates (#5969)
* Update 16_OpenID-Connect-Authentik.md

updated docs

* Add files via upload

* Update 16_OpenID-Connect-Authentik.md

Updated documentation with many clarifications. The most important one is the redirect URL which must include the port or it will not work. To ensure compatibility, I have recommended both URLs be added, with and without the port. Example docker-compose also added with traefik reverse proxy.

* Reduce screenshot size

* Fixes and improvements

* Allow changing auth to HTTP

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-12-30 23:45:31 +01:00
Alexandre Alapetite
a80a5f48a1 Pass PHPStan level 8 (#5946)
* Pass PHPStan level 8
And prepare for PHPStan level 9 https://phpstan.org/user-guide/rule-levels

* Revert wrong replace in comment

* Fix PHPStan level 8

* Update PHPStan and other dev dependencies

* Remove obsolete comment

* noVariableVariables and towards bleedingEdge
https://github.com/phpstan/phpstan-strict-rules
https://phpstan.org/blog/what-is-bleeding-edge

* More bleedingEdge

* A bit more PHPStan level 9

* More PHPStan level 9

* Prepare for booleansInConditions
Ignore int and null

* Revert wrong line

* More fixes

* Fix keep_max_n_unread

* Stricter attribute functions

* Stricter callHooks and more PHPStan level 9

* More typing

* A tiny more
2023-12-18 17:59:16 +01:00
Luc SANCHEZ
30c7a61a9b Use strict_types (#5830)
* Little's optimisations and booleans in conditions

* Apply strict type

* Apply strict type

* Apply strict type

* Fix multiple bugs with PHP 8.2 and 8.3

* Many declares missing, more errors fixed

* Apply strict type

* Another approach

* Stronger typing for Minz_Session

* Fix case of SQLite

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-11-16 22:43:00 +01:00
Alexandre Alapetite
6e2f2f1c1e A few additional PHPStan rules (#5388)
A subset of
https://github.com/phpstan/phpstan-strict-rules
2023-05-11 13:02:04 +02:00
maTh
59c1405c7d TOS in footer (#5222)
* footer added

* register page
2023-03-26 14:18:05 +02:00
Alexandre Alapetite
dbdb7869c4 Safer timezone set (#5021)
* Safer timezone set
Add missing tzdata in Docker :newest
Fallback to UTC if no timezone is defined at all
#fix https://github.com/FreshRSS/FreshRSS/pull/4906#issuecomment-1386747169

* Better refactoring
Show fallback timezone everywhere
2023-01-19 18:26:04 +01:00
Alexandre Alapetite
6261dc9cf4 User-defined time zone (#4906)
* User-defined time zone
#fix https://github.com/FreshRSS/FreshRSS/issues/2754

* Update app/i18n/nl/conf.php

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

* Timezone when creating a new user

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2022-11-29 15:27:32 +01:00
Alexis Degrugillier
db4c2798ae Allow redirection after login (#4654)
Before, if you've tried to reach a page without being logged, you'll be
automatically redirected to the index page after login.
Now, the original page is used after login.

Fix #3663
2022-10-03 16:49:52 +02:00
Alexandre Alapetite
77e9877316 Add PHPStan (#4021)
* Add PHPStan
#fix https://github.com/FreshRSS/FreshRSS/issues/4016
https://phpstan.org/

```sh
composer run-script phpstan
```

* More fixes

* Fix global variables

* Add .phtml

* Fix merge
https://github.com/FreshRSS/FreshRSS/pull/4090

* Fix more warnings

* Fix view errors and enable in CI

* ReturnTypeWillChange

* Dynamic view type

* Fix Minz static/self bug
2021-12-31 17:00:51 +01:00
maTh
a54aa19dc7 Fix: double main tags (#4014)
* replace div with main

* include the slider into main

* format source

* add close icon for the extension slider

* replace div with main

* Update shortcut.phtml

* fixed the nits
2021-12-03 00:57:32 +01:00
maTh
a29894610b a to button (#3969) 2021-11-11 20:07:10 +01:00
maTh
9712e4d888 Headline structure improvement (#3830)
* header: h1 deleted - full logo included

* template: config - display

* WIP

* shortcut configs. added fieldset. do not display the border by default

* system.phtml

* subscription: add feed or category

* wip

* wip

* Update bookmarklet.phtml

* Update archiving.phtml

* Update queries.phtml

* Update profile.phtml

* Update manage.phtml

* auth+update

* Update template.rtl.css

* fixed FreshRSS logo (Theme: Mapco)

* Update mapco.rtl.css

* Update _layout.scss

* fixed FreshRSS logo (theme: Dark)

* fix: FreshRSS logo (Theme: BlueLagoon)

* fix: FreshRSS logo (Theme: Ansum)

* fixed: FreshRSS logo (Theme: Alternative Dark)

* fix: FreshRSS logo (Theme: Pafat)

* fix: FreshRSS logo (Theme: Screwdriver)

* fix: FreshRSS logo (theme: Swage)

* Minor lint

* little fix: FreshRSS logo (Theme: Origine)

* Fix: FreshRSS logo (Theme: Origine Compact)

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-09-11 18:22:26 +02:00
maTh
f1e15cdd82 Improve the link "back to RSS feeds": set a CSS class (#3761)
* templates

* improved CSS class names
2021-08-20 14:07:14 +02:00
Alexandre Alapetite
ffb0e30dde Minor uniform stricter HTML (#3616) 2021-05-08 18:36:51 +02:00
Alexandre Alapetite
947e918f05 Travis: Enforce phpcs line length + whitespace (#3488)
* Update Travis line length

* Also check whitespace in CSS files

* Fix line length ext.php

* More syntax, string templates

* Fix exclude-pattern

* Test JS files as well
2021-02-28 12:26:24 +01:00
Alexandre Alapetite
48e0464e4b Prevent login before extra.js is loaded (#3275)
Disable submit button until extra.js with its crypto functions is
loaded.
2020-12-22 17:36:50 +01:00
flo0627
6e610e501d Add toggle password visibility button on login form (#3205)
* Add password observer for login view and update Origine theme

* Update Alternative-Dark style

* Update BlueLagoon theme

* Update Dark theme

* Update Flat theme

* Update Screwdriver theme

* Update Origine-compact theme

* Update Pafat theme

* Coding style
2020-10-03 13:35:49 +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
Julien-Pierre Avérous
acca89505b Enhance the way help elements are displayed (#2911)
* - Always display help under the targeted element.
- Use same help place for HTTP authentication in 'add' feed view than in 'update' feed view.
- Move help under input field in register view, as all other places (homogeneity).

* - Don't use "!important" as suggested by @Alkarex.
2020-04-20 23:27:17 +02:00
Andrew Hunter
f8db9ddd85 Turn off autocaptialization on the username field to improve mobile UX. (#2907)
* Turn off autocapitalization on the username field to improve mobile UX.

Fixes issue #2384

* Update app/views/auth/formLogin.phtml

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

* Update app/views/auth/register.phtml

Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr>
2020-04-18 23:38:32 +02:00
Marien Fressinaud
51edbc1578 Improve login and registration pages (#2794)
* 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
2020-03-08 00:14:29 +01:00
Alexandre Alapetite
7a5236de3f Take advantage of PHP 5.4+ short echo (#2585)
* Take advantage of PHP 5.4+ short echo

https://php.net/migration54.new-features thanks to
https://github.com/FreshRSS/FreshRSS/pull/2495

Use `<?=  ?>` instead of `<?php echo; ?>`
10kB of code saved :-)

Done with regular expression:
```
<\?php echo (.+?);? *\?>
<?= \1 ?>
```

* Try Travis fix

https://github.com/squizlabs/PHP_CodeSniffer/issues/2045#issuecomment-395238272
2019-10-23 11:18:20 +02:00
Marien Fressinaud
a2ed6626c2 Add support for terms of service
This feature is optional. It is based on the presence of a
`data/tos.html` file that an administrator can create. If this file
exists, FreshRSS will automatically add a "ToS" checkbox on the
registration page that users must check to be able to create their
account.
2019-09-17 09:21:23 +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
0513ba8d9f Use HTML autocomplete new-password (#1877)
* Use HTML autocomplete new-password

https://github.com/FreshRSS/FreshRSS/issues/1841#issuecomment-376551901
autocomplete="new-password" for user management pages

https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

* autocomplete username

https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fe-autocomplete-username
2018-05-01 21:50:45 +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
be2bf83e3c Remove maxlength for usernames
pattern is already used
2017-02-25 12:56:57 +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
ef20019591 delete - and . from accepted char 2017-02-16 18:55:19 +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
332a4dec86 Option for cookie duration
https://github.com/FreshRSS/FreshRSS/issues/1384
2016-12-24 16:33:28 +01:00
Alexandre Alapetite
d973d9efab Fix display bug for example of URL with token
https://github.com/FreshRSS/FreshRSS/issues/1274
2016-10-05 22:25:46 +02:00
Alexandre Alapetite
2a5aa34ad2 Better control of number of entries per page or RSS feed
https://github.com/FreshRSS/FreshRSS/issues/1249
* Since X hours: `https://freshrss.example/i/?a=rss&hours=3`
* Explicit number: `https://freshrss.example/i/?a=rss&nb=10`
* Limited by `min_posts_per_rss` and `max_posts_per_rss` in user config
2016-09-11 15:06:33 +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
Marien Fressinaud
669c41114f Show indications for username and password formats
See https://github.com/FreshRSS/FreshRSS/issues/679
2015-07-22 22:28:21 +02:00
Marien Fressinaud
de2e221aca Fix translations
See https://github.com/FreshRSS/FreshRSS/issues/679
2015-07-22 22:04:33 +02:00
Marien Fressinaud
f560c44a00 Hide registration form if max registration reached
See https://github.com/FreshRSS/FreshRSS/issues/679
2015-07-22 14:00:08 +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