janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
12.88k stars 1.38k forks source link

Login error 500 #3111

Closed Dmyre1350 closed 2 months ago

Dmyre1350 commented 2 months ago

Short Notice from the maintainer

After 6 years of more or less intensive programming on Calibre-Web, I need a break. The last few months, maintaining Calibre-Web has felt more like work than a hobby. I felt pressured and teased by people to solve "their" problems and merge PRs for "their" Calibre-Web. I have turned off all notifications from Github/Discord and will now concentrate undisturbed on the development of “my” Calibre-Web over the next few weeks/months.
I will look into the issues and maybe also the PRs from time to time, but don't expect a quick response from me.

Please also have a look at our Contributing Guidelines

Describe the bug/problem

Latest update 25/07/2024 19:42 When Login using User/Password. Inital login after validation is display this message error 500. But login is successful.

To Reproduce

Steps to reproduce the behavior: Login using admin. (Get the error) Reload the page and there is no more error until next Logout/Login.

Logfile

500 Internal Server Error The server encountered an internal error and was unable to complete your request. There is an error in the application. Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1519, in full_dispatch_request return self.finalize_request(rv) File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1540, in finalize_request response = self.process_response(response) File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1885, in process_response response = self.ensure_sync(func)(response) File "/app/calibre-web/cps/cw_login/login_manager.py", line 460, in _update_remember_cookie self._set_cookie(response) File "/app/calibre-web/cps/cw_login/login_manager.py", line 488, in _set_cookie data = URLSafeSerializer( File "/usr/local/lib/python3.8/dist-packages/itsdangerous/serializer.py", line 208, in dumps rv = self.make_signer(salt).sign(payload) File "/usr/local/lib/python3.8/dist-packages/itsdangerous/signer.py", line 216, in sign return value + self.sep + self.get_signature(value) File "/usr/local/lib/python3.8/dist-packages/itsdangerous/signer.py", line 209, in get_signature key = self.derive_key() File "/usr/local/lib/python3.8/dist-packages/itsdangerous/signer.py", line 198, in derive_key mac = hmac.new(secret_key, digestmod=self.digest_method) File "/usr/lib/python3.8/hmac.py", line 153, in new return HMAC(key, msg, digestmod) File "/usr/lib/python3.8/hmac.py", line 60, in init self.outer = self.digest_cons() File "/usr/lib/python3.8/hmac.py", line 58, in self.digest_cons = lambda d=b'': digestmod.new(d) AttributeError: 'staticmethod' object has no attribute 'new'

Expected behavior

User login validation. Found this error in logs : ERROR {cps:1457} Exception on /login [POST]

Screenshots

If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Calibre-Web-debug-pack (1).zip calibre-web (1).log

Additional context Add any other context about the problem here. [e.g. access via reverse proxy, database background sync, special database location]

OzzieIsaacs commented 2 months ago

Please update to the newest nightly version, it should be fixed there