There's already a question on how to deal with questions/answers with a security vulnerability. But that's not really what I'm asking.
Here's the problem. There's a post in PHP that is highly upvoted with lots of references:
Best way to use PHP to encrypt and decrypt passwords. (>10k only after deletion)
Now, the top answer (and accepted one) has a score of 230. But it also has security issues (as the comments detail).
In fact, every single answer has a security issue in one form or another.
So, my question is how to deal with this?
The obvious answer of "just comment and post your own answer" isn't really effective in this case, because the current answer is so highly upvoted that it's very unlikely that any new answer is going to overtake it.
In this particular case, it just so happened that there was a duplicate one could close this against, which has more secure answers. But in general, that's not a good solution.
So, one proposal would be to add a warning message to each answer indicating that there are vulnerabilities present, and that you should exercise extreme caution. Something like this:
BEWARE! This answer contains various security issues. Do NOT use the code samples presented here.
This question/answer is only preserved to prevent breaking links and for reference value.
What do you think? Is there another better solution to it?