2010-06-26 22:55:44 +02:00
|
|
|
# The bug here was triggered by:
|
2016-10-02 17:39:31 +02:00
|
|
|
# * performing pathname expansion because we see [
|
2010-06-26 22:55:44 +02:00
|
|
|
# * replace operator did not escape \ in replace string
|
|
|
|
|
|
|
|
IP=192.168.0.1
|
|
|
|
|
|
|
|
rm -f '192.168.0.1['
|
|
|
|
echo "${IP//./\\.}"
|
|
|
|
echo "${IP//./\\.}"'[' # bug was here
|
|
|
|
echo "${IP//./\\.}[" # bug was here
|
|
|
|
echo "${IP//./\\\\.}[" # bug was here
|
|
|
|
echo "192\.168\.0\.1["
|
|
|
|
|
|
|
|
echo >'192.168.0.1['
|
|
|
|
echo "${IP//./\\.}"
|
|
|
|
echo "${IP//./\\.}"'[' # bug was here
|
|
|
|
echo "${IP//./\\.}[" # bug was here
|
|
|
|
echo "${IP//./\\\\.}[" # bug was here
|
|
|
|
echo "192\.168\.0\.1["
|
|
|
|
|
|
|
|
rm -f '192.168.0.1['
|