mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Also refuse to open .app urls
This commit is contained in:
parent
85394a43a8
commit
2e50e22aa7
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user