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:
- Open the application.
- Open the browser console.
- 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: []
};
- Pass the object to isValidRecipe().
- 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
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:
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: []
};
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
Video format (if relevant)
Screenshots/screen recording
not required