o2r-project / o2r-shipper

Export research compendia to repositories and archives
https://o2r.info/results/
Apache License 2.0
0 stars 3 forks source link

Shipment metadata show internal filepath #37

Closed jansule closed 6 years ago

jansule commented 6 years ago

When retrieving shipment metadata the response contains an internal filepath dl_filepath. This should not be send to the client. Example response of api/v1/shipment/<shipmentId>:

{
"id": "422e1add-881f-4aa7-a846-6227cbb1d3c8",
"compendium_id": "wOgjB",
"deposition_id": null,
"deposition_url": null,
"update_packaging": null,
"recipient": "download",
"last_modified": "2018-01-09 15:33:08.867273",
"user": "0000-0001-8842-8658",
"status": "shipped",
"md": { },
"dl_filepath": "/tmp/o2r/compendium/wOgjB"
}
ghost commented 6 years ago

totally correct. do we need the dl_filepath information at all? apart from that, I can only reproduce this with docker

nuest commented 6 years ago

The filepath should not be exposed and I don't see where it would be needed.

ghost commented 6 years ago

me neither, I'm pretty sure it has come through only accidentally from here: https://github.com/o2r-project/o2r-shipper/blob/c4b2d27750492bb484beb8d4722716ab98533518/shipper.py#L353