mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Show full blocked url request
This commit is contained in:
parent
5265812c2f
commit
8b1ae42869
@ -249,13 +249,13 @@ class RequestInterceptor(QWebEngineUrlRequestInterceptor):
|
|||||||
return
|
return
|
||||||
qurl = request_info.requestUrl()
|
qurl = request_info.requestUrl()
|
||||||
if qurl.scheme() != 'file':
|
if qurl.scheme() != 'file':
|
||||||
self.log.warn(f'Blocking URL request with scheme: {qurl.scheme()}')
|
self.log.warn(f'Blocking URL request {qurl.toString()} as it is not for a local file')
|
||||||
request_info.block(True)
|
request_info.block(True)
|
||||||
return
|
return
|
||||||
path = qurl.toLocalFile()
|
path = qurl.toLocalFile()
|
||||||
path = os.path.normcase(os.path.abspath(path))
|
path = os.path.normcase(os.path.abspath(path))
|
||||||
if not path.startswith(self.container_root) and not path.startswith(self.resources_root):
|
if not path.startswith(self.container_root) and not path.startswith(self.resources_root):
|
||||||
self.log.warn(f'Blocking request with path: {path}')
|
self.log.warn(f'Blocking URL request with path: {path}')
|
||||||
request_info.block(True)
|
request_info.block(True)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user