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

tool_getparam: stop supporting @filename style for --cookie #12645

Closed
wants to merge 1 commit into from

Conversation

jay
Copy link
Member

@jay jay commented Jan 7, 2024

The @filename style was never documented for --cookie <data|filename> but prior to this change curl would accept it anyway and always treat a @ prefixed string as a filename.

That's a problem if the string also contains a = sign because then it is documented to be interpreted as a cookie string and not a filename.

Example:

--cookie @foo=bar

Before: Interpreted as load cookies from filename foo=bar.

After: Interpreted as cookie @foo=bar (name @foo and value bar).

Other curl options with a data/filename option-value use the @filename to distinguish filenames which is probably how this happened. The --cookie option has never been documented that way.

Ref: https://curl.se/docs/manpage.html#-b

Closes #xxxx

The `@filename` style was never documented for --cookie <data|filename>
but prior to this change curl would accept it anyway and always treat a
@ prefixed string as a filename.

That's a problem if the string also contains a = sign because then it is
documented to be interpreted as a cookie string and not a filename.

Example:

`--cookie @foo=bar`

Before: Interpreted as load cookies from filename foo=bar.

After: Interpreted as cookie `@foo=bar` (name `@foo` and value `bar`).

Other curl options with a data/filename option-value use the `@filename`
to distinguish filenames which is probably how this happened. The
--cookie option has never been documented that way.

Ref: https://curl.se/docs/manpage.html#-b

Closes #xxxx
@jay jay closed this in f4606a7 Jan 17, 2024
@jay jay deleted the cookie_optval_style branch January 17, 2024 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants