Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log cookie names without HttpOnly or secure flags #1496

Open
wants to merge 2 commits into
base: 3.2
Choose a base branch
from

Conversation

mkauschi
Copy link

@mkauschi mkauschi commented Feb 6, 2020

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
Copy link
Author

mkauschi commented Mar 2, 2020

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

@drwetter
Copy link
Owner

drwetter commented Mar 3, 2020

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

@mkauschi
Copy link
Author

mkauschi commented Mar 3, 2020

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.

@drwetter
Copy link
Owner

drwetter commented Mar 3, 2020

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 drwetter added the 3.3dev next release label May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.3dev next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants