Closed eudalov closed 2 years ago
@Cryptophobia , the same regexp is used in the same file, for another URL processing: https://github.com/teamhephy/controller/blob/b4c471f942fdf3ff039d6c55014f80c0799ea078/rootfs/api/urls.py#L113 It is used for parameter checking but not for the hostname.
@eudalov , it looks like in that first case the regex actually works. But here it seems to still fail? Any reason why that would be?
@Cryptophobia , well, it's because the regular expression [-_\w.@+]+
applies only to the parameter username
(the URL part coming after perms/
and untill next /
) but not the whole URL:
Here it is a Django docs about the syntax used in case with urlpatterns
and regexps: https://docs.djangoproject.com/en/4.0/topics/http/urls/#using-regular-expressions.
Fix for the issue https://github.com/teamhephy/controller/issues/162.