Skip to content

Commit

Permalink
fix(vendor.dreame): Newer dreames may store obstacle images elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed Jan 6, 2025
1 parent 1b9dc20 commit b8477fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class DreameObstacleImagesCapability extends ObstacleImagesCapability {
* @returns {Promise<import('stream').Readable|null>}
*/
async getStreamForImage(image) {
if (!/^\/data\/record\/\d+\.jpg$/.test(image)) {
if (!/^\/data\/record(?:\/ai_image)?\/\d+\.jpg$/.test(image)) {
/*
Attack scenario:
someone somehow uploads a specially crafted map file containing a path for an obstacle image
Expand Down

0 comments on commit b8477fb

Please sign in to comment.