Always returns a non NULL download_url for videos #2037

Open
opened 2026-10-05 01:04:27 +02:00 by adam · 0 comments
Owner

The pwg.categories.getImages and pwg.images.getInfo methods return a non null download_url for videos when the user does not have the right to download it.

To reproduce the error:

  • login as a webmaster
  • create a public album
  • upload a video to that public album
  • verify that guests do not have download rights
  • logout
  • browse the album as guest and verify that the video is not downloadable, only playable
  • submit the request https://…/ws.php?format=json&method=pwg.categories.getImages&cat_id=### with the appropriate album ID
  • the returned data provides a download_url instead of NULL
  • submit the request https://…/ws.php?format=json&method=pwg.images.getInfo&image_id=#### with the appropriate image ID
  • the returned data provides a download_url instead of NULL
The `pwg.categories.getImages` and `pwg.images.getInfo` methods return a non null `download_url` for videos when the user does not have the right to download it. To reproduce the error: - login as a webmaster - create a public album - upload a video to that public album - verify that guests do not have download rights - logout - browse the album as guest and verify that the video is not downloadable, only playable - submit the request `https://…/ws.php?format=json&method=pwg.categories.getImages&cat_id=###` with the appropriate album ID - the returned data provides a `download_url` instead of `NULL` - submit the request `https://…/ws.php?format=json&method=pwg.images.getInfo&image_id=####` with the appropriate image ID - the returned data provides a `download_url` instead of `NULL` <!-- github-sync-id:2903557016 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#2037