Ignore http protocol in same origin comparison

This commit is contained in:
shortcutme 2017-07-18 20:57:33 +02:00
parent 34ec05d4b4
commit 1f7b25b60c
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -394,8 +394,8 @@ class UiRequest(object):
def isSameOrigin(self, url_a, url_b): def isSameOrigin(self, url_a, url_b):
if not url_a or not url_b: if not url_a or not url_b:
return False return False
origin_a = re.sub("(http[s]{0,1}://.*?/.*?/).*", "\\1", url_a) origin_a = re.sub("http[s]{0,1}://(.*?/.*?/).*", "\\1", url_a)
origin_b = re.sub("(http[s]{0,1}://.*?/.*?/).*", "\\1", url_b) origin_b = re.sub("http[s]{0,1}://(.*?/.*?/).*", "\\1", url_b)
return origin_a == origin_b return origin_a == origin_b
# Return {address: 1Site.., inner_path: /data/users.json} from url path # Return {address: 1Site.., inner_path: /data/users.json} from url path