mirror of
https://github.com/drwetter/testssl.sh.git
synced 2024-12-31 22:09:44 +01:00
function safe_echo
In order to santize input better there's a fucntion now which does the work . ``safe_echo()``. It is actually the same as ``tml_out()`` but is a bit snappier.
This commit is contained in:
parent
833f724689
commit
e8e4609495
15
testssl.sh
15
testssl.sh
@ -397,16 +397,13 @@ html_out() {
|
||||
# here and other printf's: a little bit of sanitzing with bash internal search&replace -- otherwise printf will hiccup at '%'. '--' and %b do the rest.
|
||||
}
|
||||
|
||||
out() {
|
||||
printf -- "%b" "${1//%/%%}"
|
||||
html_out "$1"
|
||||
}
|
||||
outln() { out "$1\n"; }
|
||||
# this is intentionally the same.
|
||||
safe_echo() { printf -- "%b" "${1//%/%%}"; }
|
||||
tm_out() { printf -- "%b" "${1//%/%%}"; }
|
||||
tmln_out() { printf -- "%b" "${1//%/%%}\n"; }
|
||||
|
||||
tm_out(){
|
||||
printf -- "%b" "${1//%/%%}"
|
||||
}
|
||||
tmln_out() { tm_out "$1\n"; }
|
||||
out() { printf -- "%b" "${1//%/%%}"; html_out "$1"; }
|
||||
outln() { printf -- "%b" "${1//%/%%}\n"; html_out "$1"; }
|
||||
|
||||
#TODO: Still no shell injection safe but if just run it from the cmd line: that's fine
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user