-
Notifications
You must be signed in to change notification settings - Fork 30
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
spaces in filenames causes "scope_check" in rulesets to fail #34
Comments
I will include another issue, relating $COBRA and $ARGS used in this scope, namely using them in an interactive shell to send commands to host |
yes, this is an issue on windows systems only, where filenames can contain space. |
unfortunately, it is not staying in Windows. Desktop versions of Mac and Linux also permits spaces in names. But when going to console, then the headache starts. This case I have is in Linux. I work in an Ubuntu machine and I fetched some public repos to test from the internet. |
I made a small change in
However, I am not sure if this brokes anything else later. My knowledge of Can you please check your asserts in the parent function? if it conforms well, please add this to your codebase. YILMAZ |
checked -- just needed to add +2 to the assertion as well |
I have some files with spaces in their names.
I was getting errors because names are split before use and seen as if there are multiple files. I first thought it was my shell scripts causing the issue. Instead of using wildcards, I pull all file names with
find
and process them within a loop.But after fixing issues and making sure scripts are fine, I traced it throught the rules and found this and similar lines in other rules all having the same issue: file's name is not read as a whole thus it complains with multiple "cannot open file" errors.
If I try to use this
scope_check
in console, with quoted names, then it works fine. But running it in rulesets, it gives this name split problem.After a bit of hacking into
cobra_prim.c
(commented out 235 and 241), I could see$ARGS
holds the name of the file. I tried adding quotes around it as I did in shell scripts, then it errors out saying "Unterminated quoted string".For small number of file, or for files I own renaming is the solution to go. But that is applicable for multi-user or remote projects.
Since it is not common to have such names and not all rulesets use this
scope_check
, this is not such an urgent problem to fix asap. But, of course, would be nice to have it gone.The text was updated successfully, but these errors were encountered: