-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(upload): bug sur l'ajout de l'extension #1367
Conversation
Quality Gate passedIssues Measures |
const extension = file.originalFilename | ||
?.toLowerCase() | ||
.split(".") | ||
.reverse()[0]; | ||
if (!extension) return false; | ||
return ALLOWED_EXTENSIONS.includes(extension); | ||
return ALLOWED_EXTENSIONS.includes("." + extension); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tout ça à cause de ça x)
return res | ||
.status(400) | ||
.json({ success: false, errorMessage: "Malicious code detected" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je gère mieux les erreurs comme ça, car ça venait du fait que le fichier était pas considéré comme safe
fix #1366