Skip to content

Commit c825a70

Browse files
committed
Remove inherited double line
.. and update the comment
1 parent 520604d commit c825a70

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

testssl.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,15 +2196,10 @@ connectivity_problem() {
21962196
}
21972197

21982198
sanitze_http_header() {
2199-
# Quit on first empty line to catch 98% of the cases. Next pattern is there because the SEDs tested
2200-
# so far seem not to be fine with header containing x0d x0a (CRLF) which is the usual case.
2201-
# So we also trigger also on any sign on a single line which is not alphanumeric (plus _)
2202-
#
2203-
# Also we use tr here to remove any crtl chars which the server side offers --> possible security problem
2204-
# Only allowed now is LF + CR. See #2337
2205-
# awk, see above, doesn't seem to care
2199+
# sed implemntations tested were sometime not fine with header containing x0d x0a (CRLF) which is the usual
2200+
# case. Also we use tr here to remove any crtl chars which the server side offers --> possible security problem
2201+
# Only allowed now is LF + CR. See #2337. awk OTOH, see above, doesn't seem to care -- but not under MacOS
22062202
sed -e '/^$/q' -e '/^[^a-zA-Z_0-9]$/q' $HEADERFILE | tr -d '\000-\011\013\014\016-\037' >$HEADERFILE.tmp
2207-
sed -e '/^$/q' -e '/^[^a-zA-Z_0-9]$/q' $HEADERFILE | tr -d '\000-\010\013\014\016-\037' >$HEADERFILE.tmp
22082203
# Now to be more sure we delete from '<' or '{' maybe with a leading blank until the end
22092204
sed -e '/^ *<.*$/d' -e '/^ *{.*$/d' $HEADERFILE.tmp >$HEADERFILE
22102205
debugme echo -e "---\n $(< $HEADERFILE) \n---"

0 commit comments

Comments
 (0)