Fixed invalid prefix stripping in rngit page server

master
Mark Qvist 2026-08-28 01:50:46 +02:00
parent dc9cf0c2f4
commit 77c8256a1a
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -709,7 +709,7 @@ class NomadNetworkNode():
content = self.m_heading("Invalid Path", 1) + "\n\nNo file path specified.\n"
return self.render_template(content, st=st)
file_path = file_path.lstrip("./").replace("/./", "/")
file_path = file_path.removeprefix("./").replace("/./", "/")
file_ext = os.path.splitext(file_path)[1].lower()
renderable = file_ext in self.RENDERABLE_EXTS
if not renderable: raw = True; render = False