r/Python • • Oct 14 '23

Discussion Has your company standardized the Python 3 version to be used across all projects?

I am asking whether your company has a standard such as all Python projects should use Python 3.10.x or 3.11.x. Or maybe your company might have a standard like all Python projects must support Python 3.9+?

If your company does have a standard like that, what reasoning went behind it? If your company considered such a standard but chose not to do it, why? It would also be great if you could give an estimate of the number of devs/data scientists using Python in your company.

208 Upvotes

184 comments sorted by

View all comments

Show parent comment

4

u/00nuffin Oct 14 '23

Can you elaborate on the "leaks internal hostnames" part please?

6

u/RearAdmiralP Oct 15 '23

Yeah, the default /docs endpoint hotlinks the favicon to https://fastapi.tiangolo.com/img/favicon.png by default. So, by default, every time you access the docs page for super-secret-project.internal.company.com, your browser sends a request to a server that Tiangolo runs. The hostname of the project is visible in the referer header. He can also see your browser user agent, any cookies previously set by tiangolo.com, the ip address of the client (or proxy), etc.

It's not a huge security leak, but embedding the equivalent of a "spy pixel" in the docs page is a pretty scummy move. You don't expect the guy who wrote the web framework to track your users. It would have been easy to just include the favicon together with the rest of fastapi and serve it locally. This is what our internal fix does.

1

u/synovanon Oct 15 '23

Appreciate this, I’ll need to checkout all of my fastapi repos Monday