Skip to content

Commit a33ab63

Browse files
EmileSonneveldPeter Van Bouwel
authored andcommitted
Assert saved paths are in job folder. Open-EO#342
1 parent 537c953 commit a33ab63

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

openeo_driver/save_result.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def create_flask_response(self) -> Response:
205205
asset = assets.popitem()[1]
206206
path = Path(asset["href"])
207207
mimetype = asset.get("type")
208+
assert path.relative_to(tmp_dir)
208209
return send_from_directory(path.parent, path.name, mimetype=mimetype)
209210

210211

0 commit comments

Comments
 (0)