cozy / cozy-photos-v2

Deprecated - New : https://github.com/cozy/cozy-drive/tree/master/src/photos - Personal Photo Gallery Manager
http://cozy.io
GNU Affero General Public License v3.0
27 stars 25 forks source link

Downloading photos from public album is forbidden #229

Open clochix opened 7 years ago

clochix commented 7 years ago

The key is missing in the link allowing to download the raw picture.

On server side, accessing the photo is forbidden:

Error: Not allowed
    at module.exports.NotAllowed (/usr/local/cozy/apps/photos/build/server/helpers/errors.js:11:9)
    at /usr/local/cozy/apps/photos/build/server/controllers/photo.js:203:19
    at Object.exports.check (/usr/local/cozy/apps/photos/node_modules/cozy-clearance/index.js:32:10)
    at Object.module.exports.checkPermissionsPhoto (/usr/local/cozy/apps/photos/build/server/controllers/sharing.js:115:22)
    at doPipe (/usr/local/cozy/apps/photos/build/server/controllers/photo.js:194:18)
    at module.exports.raw (/usr/local/cozy/apps/photos/build/server/controllers/photo.js:243:10)
    at Layer.handle [as handle_request] (/usr/local/cozy/apps/photos/node_modules/americano/node_modules/express/lib/router/layer.js:82:5)
    at next (/usr/local/cozy/apps/photos/node_modules/americano/node_modules/express/lib/router/route.js:110:13)
    at Route.dispatch (/usr/local/cozy/apps/photos/node_modules/americano/node_modules/express/lib/router/route.js:91:3)
    at Layer.handle [as handle_request] (/usr/local/cozy/apps/photos/node_modules/americano/node_modules/express/lib/router/layer.js:82:5)

(temporary workaround: user can manually add the key to the URL).