Skip to content

Commit

Permalink
[routes] adapt CookielessConverter to new werkzeug router
Browse files Browse the repository at this point in the history
The new router does not perform correctly when using regex groups. Moreover,
it is now required to explicitely tell it the converter can match the forward /
using ``part_isolating``.
  • Loading branch information
anthonygego committed Aug 3, 2022
1 parent ae95c5e commit 83a76a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inginious/frontend/flask/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@

class CookielessConverter(BaseConverter):
# Parse the cookieless sessionid at the beginning of the url
regex = r"((@)([a-f0-9A-F_]*)(@/))?"
regex = "@[a-f0-9A-F_]*@/|"
part_isolating = False

def to_python(self, value):
return value[1:-2]
Expand Down

0 comments on commit 83a76a0

Please sign in to comment.