Potential fix for code scanning alert no. 105: Incomplete string escaping or encoding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Tanmay Deep Sharma
2025-07-03 00:09:27 +05:30
committed by GitHub
co-authored by Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
parent 235ce3479c
commit 6656b042b8
@@ -59,7 +59,7 @@ const validateFile = file => {
// Check file type if specified
if (
props.accept !== '*' &&
!file.type.match(new RegExp(props.accept.replace('*', '.*')))
!file.type.match(new RegExp(props.accept.replace(/\*/g, '.*')))
) {
const errorMsg = `File type not supported. Only ${props.accept} files are allowed.`;
emit('file-error', errorMsg);