If you're an avid aficionado of streaming porn, you may have more to worry about than the possibility of your spouse walking in on you as you indulge yourself. A class-action lawsuit has been filed against Mainstream Media International, the company behind YouPorn and its spinoffs, for subjecting users to "history sniffing" behind their backs and violating their privacy.

History sniffing—at least the way that YouPorn did it—involves exploiting a JavaScript vulnerability in the browser so that the site can see which other porn sites you've been viewing. In theory, this information could be used by a competing site in order to figure out what tickles your fancy and offer you something better, or by offering that data to the site's ad network so that you'll get more specifically targeted ads. Turns out that you've been surfing for pterodactyl porn at one site and something equally weird at another? YouPorn might try to use that information to better "serve" you.

Like anything involving digging into users' browsing habits without their knowledge, such behavior is not looked kindly upon—doubly so because it involves people's secret sex fantasies. According to the complaint filed in the central district of California, the YouPorn sites knowingly spied on its users and made "clear attempts" to disguise the operation.

"Defendant employed a particularly devious scheme to misdirect users who might use such tools from detecting its tracking activities—cryptography," reads the complaint. "When a website visitor uses a tool to view the JavaScript on Defendant’s websites, all they would see were a long list of decipherable letters. This is because Defendant changes each letter in the list of URL’s it is checking for by one letter. Thus, qpsoivc/dpn, for example, becomes 'pornhub.com.' It is only at the last minute that this encoded URL is translated to the correct URL to be compared to Plaintiffs’ browsing history."

The plaintiffs argue that YouPorn essentially hijacked their personal property and coerced them into giving the company information about their browsing history. As such, they and the proposed class claim that Mainstream Media violated the Computer Fraud and Abuse Act, California's Computer Crime Law, the Consumer Legal Remedies Act, and California's Unfair Competition Law.

As noted by Forbes, YouPorn isn't the only site sniffing the histories of its users. Ad networks had placed the scripts on a handful of game, sports, and news sites, though some of those networks claim to have ended the practice. In fact, YouPorn also apparently ended the practice at the end of November without much fanfare, but that may not affect the outcome of this lawsuit.