From 052d18147e8a1691043da6586a86a7e4855b12da Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Sun, 9 Aug 2015 11:29:18 -0400 Subject: [PATCH] Added permission check. --- qutebrowser/browser/network/filescheme.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/browser/network/filescheme.py b/qutebrowser/browser/network/filescheme.py index bf4133cb0..3ec6bf7ec 100644 --- a/qutebrowser/browser/network/filescheme.py +++ b/qutebrowser/browser/network/filescheme.py @@ -102,7 +102,7 @@ class FileSchemeHandler(schemehandler.SchemeHandler): A QNetworkReply. """ urlstring = request.url().toLocalFile() - if os.path.isdir(urlstring): + if os.path.isdir(urlstring) and os.access(urlstring, os.R_OK): data = dirbrowser(urlstring) return networkreply.FixedDataNetworkReply( request, data, 'text/html', self.parent())