Skip to content

Commit

Permalink
Merge pull request #899 from ltb-project/772-remove-obscure-failure-m…
Browse files Browse the repository at this point in the history
…essages-opion

Remove obscure_failure_messages option
  • Loading branch information
coudot committed May 3, 2024
2 parents 643ac2f + 01fd3b1 commit 4ea8803
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
3 changes: 0 additions & 3 deletions conf/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,6 @@
#setlocale(LC_CTYPE, "en_US.UTF-8");

# Hide some messages to not disclose sensitive information
# These messages will be replaced by badcredentials error
# by default mailnomatch is obscured since it can disclose account existence
$obscure_failure_messages = array("mailnomatch");
$obscure_usernotfound_sendtoken = true;
$obscure_notfound_sendsms = true;

Expand Down
11 changes: 2 additions & 9 deletions docs/config_general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,8 @@ characters in login with ``$login_forbidden_chars``:
.. tip:: If no characters are configured in ``$login_forbidden_chars``,
only alphanumeric characters are allowed.

You can configure "obscure" messages, so that some errors are not
displayed and replaced by a generic "bad credentials" error:

.. code-block:: php
$obscure_failure_messages = array("mailnomatch");
For the reset process via mail token and send sms token, there are also a specific parameters,
enabled by default, to avoid account disclosure:
For the reset process via mail token and send sms token, errors are hidden
by default, to avoid account disclosure:

.. code-block:: php
Expand Down
10 changes: 10 additions & 0 deletions docs/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ The default notification's behaviour for sms is obscured. To change this behavio
$obscure_notfound_sendsms = false;
Option obscure_failure_messages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The option obscure_failure_messages has been removed in favor of the specific options for Mail and SMS:

.. code-block:: php
$obscure_usernotfound_sendtoken = true;
$obscure_notfound_sendsms = true;
SMS API
~~~~~~~

Expand Down
2 changes: 0 additions & 2 deletions htdocs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,6 @@
if (isset($displayname[0])) { $smarty->assign('displayname', $displayname[0]); }
if (isset($encrypted_sms_login)) { $smarty->assign('encrypted_sms_login', $encrypted_sms_login); }

if (isset($obscure_failure_messages) && in_array($result, $obscure_failure_messages) ) { $result = "badcredentials"; }

# Set error message, criticity and fa_class

if ($result) {
Expand Down

0 comments on commit 4ea8803

Please sign in to comment.