Skip to content
Snippets Groups Projects
Commit b871537d authored by Alex's avatar Alex
Browse files

fix: django and djangoldp-account are not encoding some reserved URL caracters...

fix: django and djangoldp-account are not encoding some reserved URL caracters the exact same way, ex: 'i' could become '%2c' or '%2C'. This fix works around this issue
parent 60016df7
No related branches found
Tags v2.3.19
1 merge request!110fix: django and djangoldp-account are not encoding some reserved URL caracters...
Pipeline #15195 passed
import time import time
import uuid import uuid
from urllib.parse import urlparse from urllib.parse import urlparse, unquote
from django.http import Http404 from django.http import Http404
from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ObjectDoesNotExist
...@@ -25,7 +25,7 @@ class Solid(object): ...@@ -25,7 +25,7 @@ class Solid(object):
request_url = urlparse(request.build_absolute_uri()) request_url = urlparse(request.build_absolute_uri())
# reject if the htu does not match the protocol, origin and path of the request # reject if the htu does not match the protocol, origin and path of the request
if htu.scheme != request_url.scheme or htu.hostname != request_url.hostname or htu.path != request_url.path: if htu.scheme != request_url.scheme or htu.hostname != request_url.hostname or unquote(htu.path) != unquote(request_url.path):
raise LDPLoginError('htu_claim_not_matching_request') raise LDPLoginError('htu_claim_not_matching_request')
@classonlymethod @classonlymethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment