Hacker News new | ask | show | jobs
by h43z 699 days ago
I've never seen this extra measure "curl --proto '=https' ..."
2 comments

Yep, this is auto-generated by cargo-dist (https://opensource.axo.dev/cargo-dist/book/)
Me neither - so I looked it up at https://curl.se/docs/manpage.html With the equals it means only allow the named protocols.
What would be allowed after SSL? By default, does curl allow redirects to http:// via -L?

If so.. that's kinda sketchy from a security perspective. Especially because the flag you've shown is very unwieldy.

curl will not follow any redirects without -L, including from http to https.

But -L is very useful, so being able to prevent downgrades has useful functionality to help restrict it.

This has nothing to do with what I'm attempting to discuss.