* fixes directory traversal in Host header
This commit is contained in:
parent
6fc1763b7f
commit
7bf91f2ac7
|
@ -43,10 +43,10 @@ while read -r param; do
|
||||||
elif [[ "$param_l" == *"host:"* ]]; then
|
elif [[ "$param_l" == *"host:"* ]]; then
|
||||||
r[host]="$(sed 's/Host: //i;s/\r//;s/\\//g' <<< "$param")"
|
r[host]="$(sed 's/Host: //i;s/\r//;s/\\//g' <<< "$param")"
|
||||||
r[host_portless]="$(sed -E 's/:(.*)$//' <<< "${r[host]}")"
|
r[host_portless]="$(sed -E 's/:(.*)$//' <<< "${r[host]}")"
|
||||||
if [[ -f "config/${r[host]}" ]]; then
|
if [[ -f "config/$(basename -- ${r[host]})" ]]; then
|
||||||
source "config/${r[host]}"
|
source "config/$(basename -- ${r[host]})"
|
||||||
elif [[ -f "config/${r[host_portless]}" ]]; then
|
elif [[ -f "config/$(basename -- ${r[host_portless]})" ]]; then
|
||||||
source "config/${r[host_portless]}"
|
source "config/$(basename -- ${r[host_portless]})"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ "$param_l" == *"user-agent:"* ]]; then
|
elif [[ "$param_l" == *"user-agent:"* ]]; then
|
||||||
|
|
Loading…
Reference in a new issue