tracdap-ext-git 0.11.0rc1__tar.gz → 0.11.1.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tracdap-ext-git
3
- Version: 0.11.0rc1
3
+ Version: 0.11.1.dev0
4
4
  Summary: An extension for tracdap-runtime that loads models from Git repositories
5
5
  Author-email: Martin Traverse <martin@fintrac.co.uk>
6
6
  License-Expression: Apache-2.0
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
 
16
- __version__ = "0.11.0rc1"
16
+ __version__ = "0.11.1.dev0"
@@ -74,7 +74,12 @@ class GitRepository(IModelRepository):
74
74
  self, model_def: meta.ModelDefinition,
75
75
  checkout_dir: pathlib.Path) -> pathlib.Path:
76
76
 
77
- return checkout_dir.joinpath(model_def.path)
77
+ checkout_path = checkout_dir.joinpath(model_def.path)
78
+
79
+ if not checkout_path.resolve().is_relative_to(checkout_dir.resolve()):
80
+ raise ex.EModelRepoRequest(f"Model path [{model_def.path}] is outside the repository")
81
+
82
+ return checkout_path
78
83
 
79
84
  def checkout(self, model_def: meta.ModelDefinition, checkout_dir: pathlib.Path) -> pathlib.Path:
80
85
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tracdap-ext-git
3
- Version: 0.11.0rc1
3
+ Version: 0.11.1.dev0
4
4
  Summary: An extension for tracdap-runtime that loads models from Git repositories
5
5
  Author-email: Martin Traverse <martin@fintrac.co.uk>
6
6
  License-Expression: Apache-2.0