kisslinux / kiss

KISS Linux - Package Manager
https://kisslinux.github.io
MIT License
464 stars 62 forks source link

kiss a second argument interpreted as regex #241

Closed sdsddsd1 closed 3 years ago

sdsddsd1 commented 3 years ago
~ $ kiss a | grep ^toybox | kiss a -
Using ssu (to become root)
grep: Unmatched [, [^, [:, [., or [=
ERROR File '/usr/bin/[' exists on filesystem but isn't owned 

Let me know if more context is needed.

dylanaraps commented 3 years ago

This is not caused by prohibition of special characters. For kiss a this restriction only applies to the first argument. This is caused by the swap to pkg_owner in pkg_swap. The [ in the filename is being interpreted as regex. This is merely a matter of using grep in fixed string mode. On it.

dylanaraps commented 3 years ago

We could also escape the input. Will see which way is better.

dylanaraps commented 3 years ago

Pushed 5.5.10 to the repositories. Thanks for the issue. :)