From be25029aca3bdd188f3e86f5f630d0dbae43eebd Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 24 May 2022 12:09:20 +0200 Subject: [PATCH] This fix will stop enterprise versions from searching the user config folder for non storage type resources. Refer to SEC-253 for more information SEC-253 --- cura/CuraApplication.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index a324168f31..3a3ac17cdf 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -257,6 +257,7 @@ class CuraApplication(QtApplication): from UM.CentralFileStorage import CentralFileStorage CentralFileStorage.setIsEnterprise(ApplicationMetadata.IsEnterpriseVersion) + Resources.setIsEnterprise(ApplicationMetadata.IsEnterpriseVersion) @pyqtProperty(str, constant=True) def ultimakerCloudApiRootUrl(self) -> str: @@ -348,12 +349,12 @@ class CuraApplication(QtApplication): Resources.addExpectedDirNameInData(dir_name) app_root = os.path.abspath(os.path.join(os.path.dirname(sys.executable))) - Resources.addSearchPath(os.path.join(app_root, "share", "cura", "resources")) + Resources.addSecureSearchPath(os.path.join(app_root, "share", "cura", "resources")) - Resources.addSearchPath(os.path.join(self._app_install_dir, "share", "cura", "resources")) + Resources.addSecureSearchPath(os.path.join(self._app_install_dir, "share", "cura", "resources")) if not hasattr(sys, "frozen"): resource_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources") - Resources.addSearchPath(resource_path) + Resources.addSecureSearchPath(resource_path) @classmethod def _initializeSettingDefinitions(cls):