]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_getparam: stop supporting `@filename` style for --cookie
authorJay Satiro <raysatiro@yahoo.com>
Sun, 7 Jan 2024 05:07:55 +0000 (00:07 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Wed, 17 Jan 2024 05:32:28 +0000 (00:32 -0500)
commitf4606a796ea1e2ef5c2301e93e4cf4f1dc6d901e
tree5dd0fb819150f3fd3efcd16ff0e2d2ca60f24d73
parent3378d2bd0931433999ef4c0ca95040c394146484
tool_getparam: stop supporting `@filename` style for --cookie

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 https://github.com/curl/curl/pull/12645
src/tool_getparam.c