Also refuse to open .app urls

This commit is contained in:
Kovid Goyal 2019-09-09 10:25:28 +05:30
parent 85394a43a8
commit 2e50e22aa7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1161,7 +1161,7 @@ def safe_open_url(qurl):
if qurl.scheme() in ('', 'file'): if qurl.scheme() in ('', 'file'):
path = qurl.toLocalFile() path = qurl.toLocalFile()
ext = os.path.splitext(path)[-1].lower()[1:] ext = os.path.splitext(path)[-1].lower()[1:]
if ext in ('exe', 'com', 'cmd', 'bat', 'sh', 'psh', 'ps1', 'vbs', 'js', 'wsf', 'vba', 'py', 'rb', 'pl'): if ext in ('exe', 'com', 'cmd', 'bat', 'sh', 'psh', 'ps1', 'vbs', 'js', 'wsf', 'vba', 'py', 'rb', 'pl', 'app'):
prints('Refusing to open file:', path) prints('Refusing to open file:', path)
return return
open_url(qurl) open_url(qurl)