Bug 57172 - Internal error in selfservice while fetching reset methods
Summary: Internal error in selfservice while fetching reset methods
Status: RESOLVED WORKSFORME
Alias: None
Product: UCS
Classification: Unclassified
Component: Self Service
Version: UCS 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: UMC maintainers
QA Contact: UMC maintainers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-22 12:15 CET by Frank Greif
Modified: 2025-08-08 10:59 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2024051521000236, 2025051621000045
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Greif 2024-03-22 12:15:58 CET
When an unauthenticated user chooses 'reset password' from the burger menu, an error message appears:

"Authentication failed: internal server error during passwordreset/get_reset_methods"

in management-console-module-passwordreset.log a Python traceback is logged:

```
22.03.24 11:25:12       ERROR      (    11433) : Uncaught exception POST /univention/command/passwordreset/get_reset_methods (0.0.0.0)
    HTTPServerRequest(protocol='http', host='dc01.intern.epharisto-ev.de', method='POST', uri='/univention/command/passwordreset/get_reset_methods', version='HTTP/1.1', remote_ip='0.0.0.0')
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/univention/management/console/modules/passwordreset/tokendb.py", line 130, in open_db
        self.logger.info("db_open(): Connected to database %r on server with version %r using protocol version %r.", DB_NAME, conn.server_version, conn.protocol_version)
    TypeError: info() takes 2 positional arguments but 5 were given
```

The corresponding source has been changed recently (commit bdecb09fe28141e6f62f77347c118d41305a463d)
```
CommitDate: Tue Feb 20 11:08:55 2024 +0100

    feat(self-service): make connection properties for postgresql and memcached configurable

    Bug #57061
```
The parameters of the call to `self.logger.info` have to be adjusted.

I will change this inplace into a construct of "string %r" % (arg,arg,...) for the time being. (I know, string formatting is a matter of taste, so the real solution may look differently.)
Comment 1 Frank Greif 2024-03-22 12:29:37 CET
Addendum: I did not dig into the class behind `self.logger` so I don't know if other calls (to `exception` or `error`) in this source file would potentially suffer from the same problem.
Comment 3 Jürn Brodersen univentionstaff 2025-08-08 10:49:32 CEST
Tested with the latest self-service version (5.0 & 5.2), as far as I can tell the problem has been fixed (that's my understanding of the ticket as well).

Please reopen if the problem persists for you.

univention-self-service-passwordreset-umc:
  Installed: 7.1.2
  Candidate: 7.1.2
  Version table:
 *** 7.1.2 500
        500 https://updates.software-univention.de ucs522/main amd64 Packages
        100 /var/lib/dpkg/status

univention-self-service-passwordreset-umc:
  Installed: 5.0.11-3
  Candidate: 5.0.11-3
  Version table:
 *** 5.0.11-3 500
        500 https://updates.software-univention.de ucs5010/main amd64 Packages
        100 /var/lib/dpkg/status
     5.0.1-15A~5.0.0.202106261733 500
        500 https://appcenter-test.software-univention.de/univention-repository/5.0/maintained/component ucsschool_20250204171805/all/ Packages