Fortunately we have LLM's to not produce that crap... wait, those LLM's were trained on the existing crap and produce the same crap... oh no.
They were RL trained on verifiable rewards. It's not purely learning to predict the next token of a human produced stream.
This is not an issue. IF you prompt it right you could have avoided this with models at least a year old.
I doubt SOTA models nowadays are going to produce an implementation without any kind of authentication like here, and not tell you about it.
And even if, a later "is this ready for release" will probably surface such obvious issues.
I do not think LLMs are the problem here. Today, they are most likely more competent than whoever set this up.