Backporting Make sure control chars from HTTP header don't end up in html,csv,json

This is for 3.0. For 3.1dev, see #2332 .

This PR addresses the bug #2330 by implementing a function which removes control characters from the file output format html,csv,json in the output.
In every instance called there's a check before whether the string contains control chars, hoping it'll save a few milli seconds.

A tr function is used, omitting LF.
It doesn't filter the terminal output and the log file output, yet. It provides a function though which is not being called.
This commit is contained in:
Dirk Wetter
2023-03-12 17:40:02 +01:00
parent 34453664a1
commit 828af39053
3 changed files with 46 additions and 14 deletions

View File

@ -13,4 +13,4 @@ jobs:
- uses: codespell-project/actions-codespell@master
with:
skip: ca_hashes.txt,tls_data.txt,*.pem,OPENSSL-LICENSE.txt,.git
ignore_words_list: borken,gost,ciph,ba,bloc,isnt,chello,fo,alle,nmake,aNULL
ignore_words_list: borken,gost,ciph,ba,bloc,isnt,chello,fo,alle,nmake,anull