fix(PROJ-39): sanitizeFilename-Konflikt beheben — in ediscovery.go umbenannt
sanitizeFilename war doppelt deklariert (server.go + ediscovery.go). Funktion in ediscovery.go zu sanitizeExportFilename umbenannt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -113,7 +113,7 @@ func (s *Server) handleExportEDiscovery(w http.ResponseWriter, r *http.Request)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Stream ZIP response
|
// Stream ZIP response
|
||||||
safeCase := sanitizeFilename(caseName)
|
safeCase := sanitizeExportFilename(caseName)
|
||||||
zipName := fmt.Sprintf("%s-%s.zip", safeCase, time.Now().UTC().Format("20060102-150405"))
|
zipName := fmt.Sprintf("%s-%s.zip", safeCase, time.Now().UTC().Format("20060102-150405"))
|
||||||
w.Header().Set("Content-Type", "application/zip")
|
w.Header().Set("Content-Type", "application/zip")
|
||||||
w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, zipName))
|
w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, zipName))
|
||||||
@@ -282,8 +282,8 @@ func (s *Server) handleExportEDiscovery(w http.ResponseWriter, r *http.Request)
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// sanitizeFilename replaces characters unsafe for filenames with underscores.
|
// sanitizeExportFilename replaces characters unsafe for filenames with underscores.
|
||||||
func sanitizeFilename(s string) string {
|
func sanitizeExportFilename(s string) string {
|
||||||
var b strings.Builder
|
var b strings.Builder
|
||||||
for _, r := range s {
|
for _, r := range s {
|
||||||
switch {
|
switch {
|
||||||
|
|||||||
Reference in New Issue
Block a user