testssl.sh icon indicating copy to clipboard operation
testssl.sh copied to clipboard

Log cookie names without HttpOnly or secure flags

Open mkauschi opened this issue 5 years ago • 4 comments

This PR adds the functionality to print the Cookie names, which do not have the HttpOnly or secure flag set, in the output file.

mkauschi avatar Feb 06 '20 10:02 mkauschi

I can't figure out why the test is failing. Do you have any suggestions?

mkauschi avatar Mar 02 '20 13:03 mkauschi

I can't figure out why the test is failing. Do you have any suggestions?

not sure. You can run /t08_isHTML_valid.t from the terminal.

read -r -a not_secure <<< $(awk -F"=" '{print$1}' <<< $(awk -F" " '{print$2}' <<< $(grep -iav secure $TMPFILE))) seems rather ugly to me. Preferred solution would be with bash only

drwetter avatar Mar 03 '20 12:03 drwetter

I can't figure out why the test is failing. Do you have any suggestions?

not sure. You can run /t08_isHTML_valid.t from the terminal.

I will try that.

read -r -a not_secure <<< $(awk -F"=" '{print$1}' <<< $(awk -F" " '{print$2}' <<< $(grep -iav secure $TMPFILE))) seems rather ugly to me.

I will improve the code by introducing variables and add some comments. I'm also always open for improvement suggestions.

Preferred solution would be with bash only

You mean because I used grep to find the correct lines? I tried to be in line with the rest of the "cookie parsing" code and there is grep used as well. But I can see if I find a better solution.

mkauschi avatar Mar 03 '20 20:03 mkauschi

You mean because I used grep to find the correct lines

The combination of grep and awk. Maybe read works here (like read a b c <<< "Hello you here")

Rough coding style: https://github.com/drwetter/testssl.sh/blob/docu_update/Coding_Convention.md

drwetter avatar Mar 03 '20 21:03 drwetter