Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 8f53a8f

Browse files
author
William Douglas
committed
Remove filename blacklist
1 parent d62e67b commit 8f53a8f

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

builder/build_validate.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,11 +493,6 @@ func (b *Builder) resolvePkgFiles(pkg *pkgInfo, downloadRetries int) ([]*fileInf
493493
continue
494494
}
495495

496-
// Files with blacklisted characters are skipped
497-
if swupd.FilenameBlacklisted(filepath.Base(path)) {
498-
continue
499-
}
500-
501496
// Directories are omitted from MCA because they may be missed from rpm output.
502497
mode := fileMetadata[3]
503498
if mode[:1] == "d" {

swupd/filesystem.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ import (
2424
"github.com/clearlinux/mixer-tools/log"
2525
)
2626

27-
const illegalChars = ";&|*`/<>\\\"'\a"
28-
29-
// FilenameBlacklisted checks for illegal characters in filename
30-
func FilenameBlacklisted(fname string) bool {
31-
return strings.ContainsAny(fname, illegalChars)
32-
}
33-
3427
// createFileRecord creates a manifest File entry from a file
3528
func (m *Manifest) createFileRecord(rootPath, path, removePrefix string, fi os.FileInfo) error {
3629
file, err := recordFromFile(rootPath, path, removePrefix, fi)
@@ -74,10 +67,6 @@ func recordFromFile(rootPath, path, removePrefix string, fi os.FileInfo) (*File,
7467
return nil, nil
7568
}
7669

77-
if FilenameBlacklisted(filepath.Base(fname)) {
78-
return nil, fmt.Errorf("%s is a blacklisted file name", fname)
79-
}
80-
8170
file = &File{
8271
Name: fname,
8372
Info: fi,

0 commit comments

Comments
 (0)