Make sure host is valid for qute:// redirects

This commit is contained in:
Florian Bruhin 2017-04-16 13:15:15 +02:00
parent c82bd83715
commit 9d2734ff62

View File

@ -146,7 +146,8 @@ def data_for_url(url):
new_url.setScheme('qute')
new_url.setHost(path)
new_url.setPath('/')
raise Redirect(new_url)
if new_url.host(): # path was a valid host
raise Redirect(new_url)
try:
handler = _HANDLERS[host]