2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-07-15 10:21:00 +00:00

Have messages force normalizing the incoming filenames

This avoids downstream code that may expect specific locations from being confused.
This commit is contained in:
Jarrod Johnson
2026-06-25 09:48:11 -04:00
parent f82993efe7
commit a201e9886e
+4
View File
@@ -19,6 +19,7 @@
# Things are defined here to 'encourage' developers to coordinate information
# format. This is also how different data formats are supported
import base64
import os
import confluent.exceptions as exc
import confluent.config.configmanager as cfm
import confluent.config.conf as cfgfile
@@ -604,6 +605,9 @@ class InputFirmwareUpdate(ConfluentMessage):
node, value = expanded
if value != self._filename:
self._complexname = True
value = os.path.normpath(value)
if value.startswith('../'):
raise Exception('File transfer with ../ is not supported')
self.filebynode[node] = value
@property