Skip to content

Security: don't print provided HTTP header value as part of help info #1297

@sanmai-NL

Description

@sanmai-NL

Printing the actual provided HTTP request header is not needed to help the user. But it does add an information leak in logs. I think that a custom header in most applications of Lychee in practice, would contain sensitive values.

Actual behavior

$ read gitlabtoken
read> glpat-SECRET
$ lychee --header "PRIVATE-TOKEN=$gitlabtoken" https://gitlab.com/mysecretproject
Error: Header value must be of the form key=value, got PRIVATE-TOKEN: glpat-SECRET

Desired behavior

$ read gitlabtoken
read> glpat-SECRET
$ lychee --header "PRIVATE-TOKEN=$gitlabtoken" https://gitlab.com/mysecretproject
Error: Header value must be of the form key=value.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions