chore: build
This commit is contained in:
@@ -145,11 +145,7 @@ func validateFileMimeType(fileHeader *multipart.FileHeader) (string, error) {
|
||||
func sanitizeFilePath(path string) (string, error) {
|
||||
cleaned := filepath.Clean(path)
|
||||
|
||||
if strings.Contains(cleaned, "..") || strings.Contains(cleaned, ".") {
|
||||
return "", fmt.Errorf("path traversal détecté")
|
||||
}
|
||||
|
||||
if strings.Contains(cleaned, "//..//") || strings.Contains(cleaned, "/../") {
|
||||
if strings.Contains(cleaned, "..") {
|
||||
return "", fmt.Errorf("path traversal détecté")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user