mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-11-04 05:55:36 -07:00
kiss: Don't allow invalid characters via PWD
This commit is contained in:
parent
b766584b71
commit
03c801fd66
5
kiss
5
kiss
@ -1472,7 +1472,7 @@ args() {
|
|||||||
# https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
|
# https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
|
||||||
[ "${action##[as]*}" ] &&
|
[ "${action##[as]*}" ] &&
|
||||||
case "$*" in *\**|*\!*|*\[*|*\]*)
|
case "$*" in *\**|*\!*|*\[*|*\]*)
|
||||||
die "Arguments contain invalid characters: '!*[]'"
|
die "Arguments contain invalid characters: '!*[]' ($*)"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Parse some arguments earlier to remove the need to duplicate code.
|
# Parse some arguments earlier to remove the need to duplicate code.
|
||||||
@ -1503,7 +1503,8 @@ args() {
|
|||||||
# Second early check to use $PWD in place of arguments.
|
# Second early check to use $PWD in place of arguments.
|
||||||
[ "$1" ] || case $action in b|build|c|checksum|i|install|r|remove)
|
[ "$1" ] || case $action in b|build|c|checksum|i|install|r|remove)
|
||||||
export KISS_PATH=${PWD%/*}:$KISS_PATH
|
export KISS_PATH=${PWD%/*}:$KISS_PATH
|
||||||
set -- "${PWD##*/}"
|
args "$action" "${PWD##*/}"
|
||||||
|
return 0
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Actions can be abbreviated to their first letter. This saves
|
# Actions can be abbreviated to their first letter. This saves
|
||||||
|
Loading…
Reference in New Issue
Block a user