Skip to content
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

Clamdscan: discrepancies in processing file names on the command line vs in the --file-list file #1388

Open
sfc-gh-dbasavin opened this issue Oct 10, 2024 · 0 comments

Comments

@sfc-gh-dbasavin
Copy link

I encountered an issue trying to use clamdscan with --file-list option when one of the files I want to scan has special characters in the name.

Test file name: 'test'$'\n\n''SHUTDOWN'$'\n''.py', located in the /temp/ folder.

This works:

> clamdscan 'test'$'\n\n''SHUTDOWN'$'\n''.py'

/temp/test

SHUTDOWN
.py: OK

This does not work:

> echo "'test'$'\n\n''SHUTDOWN'$'\n''.py'" > file_list.txt 
> cat file_list.txt 
'test'$'\n\n''SHUTDOWN'$'\n''.py'

> clamdscan --file-list=file_list.txt

ERROR: Can't access file /temp/'test'$'\n\n''SHUTDOWN'$'\n''.py'

Environment info:

  • ClamAV version: ClamAV 1.0.5/27420/Mon Oct 7 08:43:46 2024
  • OS: Debian 11

So it looks like file names are processed differently when they are specified directly on the command line vs when they are specified in the --file-list file. I would really appreciate any suggestions on how to make the behavior consistent when special characters are present. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant