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 11, 2022
1 parent 98aa420 commit 20cb1dd
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 @@ -52,7 +52,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 20cb1dd

Please sign in to comment.