Skip to content

Commit 678799d

Browse files
authored
[client] fix(configuration): correctly eval config.data to avoid falling into search path (#154)
Signed-off-by: Antoine MAZEAS <[email protected]>
1 parent 91a7eff commit 678799d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pyoaev/configuration/configuration.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,12 @@ def get(self, config_key: str) -> CONFIGURATION_TYPES:
146146
return None
147147

148148
return self.__process_value_to_type(
149-
config.data or self.__dig_config_sources_for_key(config), config.is_number
149+
(
150+
self.__dig_config_sources_for_key(config)
151+
if config.data is None
152+
else config.data
153+
),
154+
config.is_number,
150155
)
151156

152157
def set(self, config_key: str, value: CONFIGURATION_TYPES):

0 commit comments

Comments
 (0)