Skip to content

Commit c845424

Browse files
starbopsclaude
andcommitted
fix(lint): remove trailing whitespace in copyFile function
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 844d4f5 commit c845424

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cmd/api/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,11 @@ func copyFile(src, dst string) error {
249249
// Validate and clean paths to prevent directory traversal
250250
cleanSrc := filepath.Clean(src)
251251
cleanDst := filepath.Clean(dst)
252-
252+
253253
// Additional security check: ensure paths don't contain ".." or other suspicious patterns
254254
if !filepath.IsAbs(cleanSrc) || !filepath.IsAbs(cleanDst) {
255255
return fmt.Errorf("paths must be absolute")
256256
}
257-
258257
// #nosec G304 - Path traversal mitigation: paths are validated and cleaned above
259258
sourceFile, err := os.Open(cleanSrc)
260259
if err != nil {

0 commit comments

Comments
 (0)