-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
repl: "dump" failing on case-sensitive file systems? #5229
Comments
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. |
@srenatus could I pick this up? |
@srenatus is converting the command to Lower case necessary here? Either we can remove this lower case conversion, or we would have to pass the filepath in this function to recover the case sensitive filepath. |
Thanks for looking into this. I don't know the reason for the lower-casing there; but I think we should do OK with splitting on space first, and lower-casing the first part only: that's the command. We'd leave the filepath argument untouched. |
I've assigned you. Thanks for contributing 👏 |
Any updates on this @burnerlee ? |
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. |
Hi @srenatus. I see the issue is still present in OPA, may I try to finish what @burnerlee suggested and open a PR? |
Sure! |
This commit changes the behavior of the function `newCommand` in `repl.go`. The input of this function is a string containing both a command to be run and its arguments. Prior to this commit, the function converted the entire input to lower case, without any distinction between the command and its arguments. This lead to the bug exposed in issue open-policy-agent#5229. Both the lowercase command and all lower case arguments are put as fields in the `command` struct returned by the function. After this commit, the only part of the string that is converted to lower case is the command that is being executed, while the provided arguments are evaluated as provided to the function. The struct returned now contains the lower case command and the arguments as provided to the function. Fixes: open-policy-agent#5229 Signed-off-by: Gianluca Oldani <oldanigianluca@gmail.com>
This commit changes the behavior of the function `newCommand` in `repl.go`. The input of this function is a string containing both a command to be run and its arguments. Prior to this commit, the function converted the entire input to lower case, without any distinction between the command and its arguments. This lead to the bug exposed in issue open-policy-agent#5229. Both the lowercase command and all lower case arguments are put as fields in the `command` struct returned by the function. After this commit, the only part of the string that is converted to lower case is the command that is being executed, while the provided arguments are evaluated as provided to the function. The struct returned now contains the lower case command and the arguments as provided to the function. Fixes: open-policy-agent#5229 Signed-off-by: Gianluca Oldani <oldanigianluca@gmail.com>
This commit changes the behavior of the function `newCommand` in `repl.go`. The input of this function is a string containing both a command to be run and its arguments. Prior to this commit, the function converted the entire input to lower case, without any distinction between the command and its arguments. This lead to the bug exposed in issue open-policy-agent#5229. Both the lowercase command and all lower case arguments are put as fields in the `command` struct returned by the function. After this commit, the only part of the string that is converted to lower case is the command that is being executed, while the provided arguments are evaluated as provided to the function. The struct returned now contains the lower case command and the arguments as provided to the function. Fixes: open-policy-agent#5229 Signed-off-by: Gianluca Oldani <oldanigianluca@gmail.com>
This commit changes the behavior of the function `newCommand` in `repl.go`. The input of this function is a string containing both a command to be run and its arguments. Prior to this commit, the function converted the entire input to lower case, without any distinction between the command and its arguments. This lead to the bug exposed in issue open-policy-agent#5229. Both the lowercase command and all lower case arguments are put as fields in the `command` struct returned by the function. After this commit, the only part of the string that is converted to lower case is the command that is being executed, while the provided arguments are evaluated as provided to the function. The struct returned now contains the lower case command and the arguments as provided to the function. Fixes: open-policy-agent#5229 Signed-off-by: Gianluca Oldani <oldanigianluca@gmail.com>
This commit changes the behavior of the function `newCommand` in `repl.go`. The input of this function is a string containing both a command to be run and its arguments. Prior to this commit, the function converted the entire input to lower case, without any distinction between the command and its arguments. This lead to the bug exposed in issue open-policy-agent#5229. Both the lowercase command and all lower case arguments are put as fields in the `command` struct returned by the function. After this commit, the only part of the string that is converted to lower case is the command that is being executed, while the provided arguments are evaluated as provided to the function. The struct returned now contains the lower case command and the arguments as provided to the function. Fixes: open-policy-agent#5229 Signed-off-by: Gianluca Oldani <oldanigianluca@gmail.com>
This commit changes the behavior of the function `newCommand` in `repl.go`. The input of this function is a string containing both a command to be run and its arguments. Prior to this commit, the function converted the entire input to lower case, without any distinction between the command and its arguments. This lead to the bug exposed in issue #5229. Both the lowercase command and all lower case arguments are put as fields in the `command` struct returned by the function. After this commit, the only part of the string that is converted to lower case is the command that is being executed, while the provided arguments are evaluated as provided to the function. The struct returned now contains the lower case command and the arguments as provided to the function. Fixes: #5229 Signed-off-by: Gianluca Oldani <oldanigianluca@gmail.com>
That's the evidence: #5227 (comment)
There is no reason it should depend on case-insensitivity to work correctly. Let's make it work on case-sensitive FSes.
The text was updated successfully, but these errors were encountered: