Exipiration Share Mail Password

Hello everybody,
we have recently updated our nextcloud to version 24.0.1 and we immediately found the sharing mail functionality interesting.
However, we encountered a problem with password expiration.

We have activated the password expiration as reported in the admin manual (Configuration Parameters — Nextcloud latest Administration Manual latest documentation).

We tried to pass the following values ​​to the config file:
‘sharing.enable_mail_link_password_expiration’ => false,
‘sharing.mail_link_password_expiration_interval’ => 3600,
but the password never expires.

Then also we tried to pass the following values ​​to the config file:
‘sharing.enable_mail_link_password_expiration’ => true,
‘sharing.mail_link_password_expiration_interval’ => 3600,
but the password does not expire anyway.

We have also changed the expiration interval but the password does not expire anyway.

At this point, checking the various files, we changed the following line in the file /var/www/nextcloud/lib/private/Share20/Manager.php (server/Manager.php at master · nextcloud/server · GitHub):
if (! $ this-> config-> getSystemValue (‘sharing.enable_mail_link_password_expiration’, false)) {
in
if (! $ this-> config-> getSystemValue (‘sharing.enable_mail_link_password_expiration’, ‘false’)) {

and we changed the option in the config.php:
‘sharing.enable_mail_link_password_expiration’ => false,
in
‘sharing.enable_mail_link_password_expiration’ => ‘false’,

In this way the functionality works as expected.
It seemed strange to us to use it the getSystemValue function for a boolean in the Manager.php file.

We do not know if we are missing something or if it is a bug.

I hope someone can clarify our ideas.

A greeting!

If found this specific function for bool variables:

And it is used for other bool config values, so it looks like it could be a bug. So please open a bug report on Issues · nextcloud/server · GitHub