Skip to content

[BUG] isValidRecipe() does not validate the denoise property #1419

@parakramgambhir14

Description

@parakramgambhir14

Bug description
The isValidRecipe() function validates most properties of the EditRecipe interface but does not validate the denoise field.

As a result, malformed recipe objects containing invalid values for denoise can incorrectly pass validation and be treated as valid recipes.

This may lead to inconsistent application state or unexpected behavior when recipes are restored from localStorage or imported from external sources.

Steps to reproduce
Steps to reproduce the behavior:

  1. Open the application.
  2. Open the browser console.
  3. Create a recipe object with an invalid denoise value:
    const recipe = {
    version: 1,
    preset: "youtube",
    customWidth: 1920,
    customHeight: 1080,
    framing: "fit",
    trimStart: 0,
    trimEnd: null,
    rotate: 0,
    keepAudio: true,
    normalizeAudio: false,
    speed: 1,
    quality: 23,
    format: "mp4",
    stabilization: false,
    denoise: "invalid",
    brightness: 0,
    contrast: 1,
    saturation: 1,
    soundOnCompletion: true,
    textOverlays: []
    };
  4. Pass the object to isValidRecipe().
  5. Observe that validation returns true.

Expected behavior

isValidRecipe() should reject any recipe where denoise is not a boolean value.

Example:
denoise: "invalid"

should cause validation to return:
false

Actual behavior

The recipe passes validation despite containing an invalid value for denoise.

Browser and OS info

  • OS: [Windows 11]
  • Browser: [Chrome]
  • Version: [Latest]

Video format (if relevant)

  • Input video format: N/A
  • Export preset used: N/A
  • File size:N/A

Screenshots/screen recording
not required

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions