UCL-INGI / INGInious

INGInious is a secure and automated exercises assessment platform using your own tests, also providing a pluggable interface with your existing LMS.
http://www.inginious.org
Other
202 stars 139 forks source link

[frontend/app] Werkzeug 3.0.0 incompatible with flask-session 0.5.0 #972

Closed nrybowski closed 9 months ago

nrybowski commented 11 months ago

Describe the bug

Accessing any page on the web frontend fails with a HTTP 500 error. See below for the server logs:

inginious-frontend-1      | Traceback (most recent call last):
inginious-frontend-1      |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 891, in finalize_request
inginious-frontend-1      |     response = self.process_response(response)
inginious-frontend-1      |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1270, in process_response
inginious-frontend-1      |     self.session_interface.save_session(self, ctx.session, response)
inginious-frontend-1      |   File "/inginious/inginious/frontend/flask/mongo_sessions.py", line 143, in save_session
inginious-frontend-1      |     response.set_cookie(self.get_cookie_name(app), session_id,
inginious-frontend-1      |   File "/usr/local/lib/python3.9/site-packages/werkzeug/sansio/response.py", line 224, in set_cookie
inginious-frontend-1      |     dump_cookie(
inginious-frontend-1      |   File "/usr/local/lib/python3.9/site-packages/werkzeug/http.py", line 1303, in dump_cookie
inginious-frontend-1      |     if not _cookie_no_quote_re.fullmatch(value):
inginious-frontend-1      | TypeError: cannot use a string pattern on a bytes-like object
inginious-frontend-1      | 
inginious-frontend-1      | 2023-10-10 18:44:04,470 - inginious.webapp.requests - INFO - 172.19.0.1:42332 - "- GET /signin" - 500 INTERNAL SERVER ERROR

INGInious installation details

To Reproduce Steps to reproduce the behavior:

  1. Install INGInious on the provided hash.
  2. Launch INGInious services.
  3. Access to the web frontend.

Additional context See https://github.com/pallets-eco/flask-session/issues/191.

The version of the packages should be fixed and manually updated from release to release. As discussed in https://github.com/UCL-INGI/INGInious/issues/967, the CI should test for compatibility with new packages versions.