Skip to content

Commit 309b565

Browse files
committed
fix csp regression
1 parent 4a8a90a commit 309b565

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jinjafx_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def do_GET(self, head=False, cache=True, versioned=False):
259259
self.critical = True
260260

261261
def sanitise_dt(dt):
262-
dt = '\n'.join([ln for ln in dt.splitlines() if not ln.startswith(('dt_password:', 'dt_mpassword:', 'remote_addr:'))])
262+
fields = ('dt_password:', 'dt_mpassword:', 'remote_addr:')
263+
dt = '\n'.join([ln for ln in dt.splitlines() if not ln.startswith(fields)])
263264
return dt.encode('utf-8')
264265

265266
if aws_s3_url or github_url or repository:
@@ -303,7 +304,6 @@ def sanitise_dt(dt):
303304

304305
if os.path.isfile(fpath):
305306
with open(fpath, 'rb') as f:
306-
#rr = f.read()
307307
dt = f.read().decode('utf-8')
308308

309309
r = [ 'application/json', 200, json.dumps({ 'dt': self.e(sanitise_dt(dt)).decode('utf-8') }).encode('utf-8'), sys._getframe().f_lineno ]

0 commit comments

Comments
 (0)