While the explanations given in the thread about how traces of cocaine could have gotten on the victim's socks are quite plausible, the much more important constitutional issue concerns the TSA's practice of illegally searching for drugs. When the ETD machines were installed, I remember pulling up the company website and reading that these machines can easily be programmed to detect any residue trace: explosive-like materials and narcotics.
If they are searching for drugs at individual airports, I can believe that they could get away with it. If it was a TSA-wide practice, I find it hard to believe that they could have kept it a secret for as long as they have. Regardless, the now-useless TSA Blog hasn't reported a drug bust in a very long time. It's been a long time since we have read about a passenger being busted for drugs at a TSA checkpoint from sources other than the TSA. (If I've missed something, please post links to the stories.)
If the TSA "employee" said he detected cocaine on the victim's socks, why didn't he call the airport cops and have the victim arrested? There's more than one thing about this story that just doesn't add up.