Update ESLint rules and resolve bot review feedback #8
@@ -106,9 +106,11 @@ export class GeneralSection implements ModalSection {
|
||||
|
||||
// Validate output folder
|
||||
if (this.outputFolderInput) {
|
||||
|
|
||||
const value = normalizePath(this.outputFolderInput.value.trim());
|
||||
if (!SecurityUtils.validateOutputPath(value)) {
|
||||
errors.push(SecurityUtils.getPathValidationError(value));
|
||||
const rawValue = this.outputFolderInput.value.trim();
|
||||
// Don't normalize absolute paths as normalizePath strips the leading slash
|
||||
const normalizedValue = path.isAbsolute(rawValue) ? rawValue : normalizePath(rawValue);
|
||||
if (!SecurityUtils.validateOutputPath(normalizedValue)) {
|
||||
errors.push(SecurityUtils.getPathValidationError(normalizedValue));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user
⚠️ Potential issue | 🟠 Major
Inconsistent path handling between onChange and validate.
The onChange handler preserves absolute paths (line 85), but the validate() method always normalizes paths including absolute ones (line 109). This inconsistency could cause validation to incorrectly handle absolute paths that were previously accepted.
Apply this diff to make validation consistent:
🤖 Prompt for AI Agents
✅ Addressed in commits
f0daebctoc1c02ee