Live data from Hacker News

Cursed Knowledge

immich.app

61–70 of 165 posts

Re: Cursed Knowledge

#61
> Fetch requests in Cloudflare Workers use http by default, even if you explicitly specify https, which can often cause redirect loops.

This is whack as hell but doesn't seem to be the default? This issue was caused by the "Flexible" mode, but the docs say "Automatic" is the default? (Maybe it was the default at the time?)

> Automatic SSL/TLS (default)

https://developers.cloudflare.com/ssl/origin-configuration/s...

Re: Cursed Knowledge

#62
post #2

The '50 extra packages' one is wild. The author of those packages has racked up a fuckload of downloads. What a waste of total bandwidth and disk space everywhere. I wonder if it's for clout.

The maintainer who this piece of “cursed knowledge” is referencing is a member of TC39, and has fought and died on many hills in many popular JavaScript projects, consistently providing some of the worst takes on JavaScript and software development imaginable. For this specific polyfill controversy, some people alleged a pecuniary motivation, I think maybe related to GitHub sponsors or Tidelift, but I never verified…

to save everyone else a search, it's probably ljharb. (I am not a member of JS community, so, come and attack me.)

Re: Cursed Knowledge

#63
post #24

> npm scripts make a http call to the npm registry each time they run, which means they are a terrible way to execute a health check. Is this true? I couldn’t find another source discussing it. That would be insane behavior for a package manager.

It might be referring to the check if whether npm is up to date so it can prompt you to update if it isn't?

Re: Cursed Knowledge

#64
post #61

> Fetch requests in Cloudflare Workers use http by default, even if you explicitly specify https, which can often cause redirect loops. This is whack as hell but doesn't seem to be the default? This issue was caused by the "Flexible" mode, but the docs say "Automatic" is the default? (Maybe it was the default at the time?) > Automatic SSL/TLS (default) https://developers.cloudflare.com/ssl/origin-configuration/s...

> This is whack as hell but doesn't seem to be the default?

I don't think so. If you read about what Flexible SSL means, you are getting exactly what you are asking for.

https://developers.cloudflare.com/ssl/origin-configuration/s...

Here is a direct quote of the recommendation on how this feature was designed to be used:

> Choose this option when you cannot set up an SSL certificate on your origin or your origin does not support SSL/TLS.

Furthermore, Cloudflare's page on encryption modes provides this description of their flexible mode.

> Flexible : Traffic from browsers to Cloudflare can be encrypted via HTTPS, but traffic from Cloudflare to the origin server is not. This mode is common for origins that do not support TLS, though upgrading the origin configuration is recommended whenever possible.

So, people go out of their way to set an encryption mode that was designed to forward requests to origin servers that do not or cannot support HTTPS connections, and then are surprised those outbound connections to their origin servers are not HTTPS.

Re: Cursed Knowledge

#65
post #61

> Fetch requests in Cloudflare Workers use http by default, even if you explicitly specify https, which can often cause redirect loops. This is whack as hell but doesn't seem to be the default? This issue was caused by the "Flexible" mode, but the docs say "Automatic" is the default? (Maybe it was the default at the time?) > Automatic SSL/TLS (default) https://developers.cloudflare.com/ssl/origin-configuration/s...

> This is whack as hell but doesn't seem to be the default? I don't think so. If you read about what Flexible SSL means, you are getting exactly what you are asking for. https://developers.cloudflare.com/ssl/origin-configuration/s... Here is a direct quote of the recommendation on how this feature was designed to be used: > Choose this option when you cannot set up an SSL certificate on your origin or your origin doe…

I get that it's a compatibility workaround (I did look at the docs before posting) but it's a.) super dangerous and b.) apparently was surprising to the authors of this post. I'm gunnuh keep describing "communicate with your backend in plain text and get caught in infinite redirect loops mode" whack but reasonable people may disagree.

I would like to know how this setting got enabled, however. And I don't think the document should describe it as a "default" if it isn't one.

Re: Cursed Knowledge

#66
post #2

The '50 extra packages' one is wild. The author of those packages has racked up a fuckload of downloads. What a waste of total bandwidth and disk space everywhere. I wonder if it's for clout.

It's probably a clout thing, or just a weird guy (Hanlon's Razor), but a particularly paranoid interpretation is that this person is setting up for a massive, multi-pronged software supplychain attack.

> (...) but a particularly paranoid interpretation is that this person is setting up for a massive, multi-pronged software supplychain attack.

That person might not be doing it knowingly or on purpose, but regardless of motivations that is definitely what is being done.

Re: Cursed Knowledge

#67

Earlier quoted context omitted.

The maintainer who this piece of “cursed knowledge” is referencing is a member of TC39, and has fought and died on many hills in many popular JavaScript projects, consistently providing some of the worst takes on JavaScript and software development imaginable. For this specific polyfill controversy, some people alleged a pecuniary motivation, I think maybe related to GitHub sponsors or Tidelift, but I never verified…

to save everyone else a search, it's probably ljharb. (I am not a member of JS community, so, come and attack me.)

Wow that's some deep rabbit hole. This guy gets paid per XY npm downloads and games the system through this. Awful.

Re: Cursed Knowledge

#69
post #65

Earlier quoted context omitted.

> This is whack as hell but doesn't seem to be the default? I don't think so. If you read about what Flexible SSL means, you are getting exactly what you are asking for. https://developers.cloudflare.com/ssl/origin-configuration/s... Here is a direct quote of the recommendation on how this feature was designed to be used: > Choose this option when you cannot set up an SSL certificate on your origin or your origin doe…

I get that it's a compatibility workaround (I did look at the docs before posting) but it's a.) super dangerous and b.) apparently was surprising to the authors of this post. I'm gunnuh keep describing "communicate with your backend in plain text and get caught in infinite redirect loops mode" whack but reasonable people may disagree. I would like to know how this setting got enabled, however. And I don't think the d…

> I get that it's a compatibility workaround (...) but it's a.) super dangerous (...)

It's a custom mode where you explicitly configure your own requests to your own origin server to be HTTP instead of HTTPS. Even Cloudflare discourages the use of this mode, and you need to go way out of your way to explicitly enable it.

> (...) apparently was surprising to the authors of this post.

The post is quite old, and perhaps Cloudflare's documentation was stale back then. However, it is practically impossible to set flexible mode being aware of what it means and what it does.

> I would like to know how this setting got enabled, however.

Cloudflare's docs state this is a custom encryption mode that is not set by default and you need to purposely go to the custom encryption mode config panel to pick this option among half a dozen other options.

Perhaps this was not how things were done back then, but as it stands this is hardly surprising or a gotcha. You need to go way out of your way to configure Cloudflare to do what amounts to TLS termination at the edge, and to do so you need to skip a bunch of options that enforce https.

Re: Cursed Knowledge

#70
post #6

This is awesome. Disappointing to hear about the Cloudflare fetch issue.

> Disappointing to hear about the Cloudflare fetch issue.

You mean the one where explicitly configuring Cloudflare to forward requests to origin servers as HTTP will actually send requests as HTTP? That is not what I would describe as disappointing.

Post reply on HN