String like =~ in Bash not escaped properly by escape(All) with interpolation escaping enabled
#169
Labels
bug
Something isn't working
Bug Report
v1.5.0Description
If the string
=~appears at the end of an argument in Bash (without quoting the argument) the tilde (~) will be expanded to the home directory. Similarly, whenxxx:~,~:xxxorxxx:~:xxxappears after=(wherexxxcan be any string), the tilde (~) will be expanded, this even works for multiple tildes.Actual Behaviour
When running
shescape.escape(All)with interpolation escaping enabled the trailing~is not escaped and therefore expanded when the argument is used.Expected Behaviour
When running
shescape.escape(All)with interpolation escaping enabled the trailing~should be escaped to avoid it being expanded when the argument is used.Working Examples
This category of bug was found by fuzzing, the crash results can be found here:
The text was updated successfully, but these errors were encountered: