Legislators in California and throughout the country say they are trying to make the internet a safer place – and limit the harassment, harm, misogyny and misinformation that have become too common in the online world. In their haste to protect the public, however, they risk making the internet a more foreboding place.

California’s approach is admittedly less noxious than the one taken in Texas and Florida, which would make government regulators the final arbiters of free speech—with all the First Amendment problems that entails. Assembly Bill 587, which is gaining steam as the California Legislature heads toward the end of session, tries instead to empower individuals by providing users with meaningful information about content moderation practices.

In the politically charged space of internet regulation, even laudable goals may result in disturbing, unwanted consequences. The bill’s  fine print creates the possibility of abuse, allowing prosecutors and courts to cross the line between consumer protection and speech regulation. If it approves this law, California may end up similar to Texas and Florida, albeit unintentionally. AB 587 could give the government far too much power to shape online speech to serve political objectives.

For markets to be effective, consumers must have meaningful choices and adequate information to inform decisions. In social media, this means clear information on content policies, terms of service and moderation mechanisms. This must be sufficient to help users understand how their content will be treated by a platform and how the platform will help protect their online engagement. At the R Street Institute, we call for “clarity and specificity” in all content-moderation policies.

Against that backdrop, the idea behind AB 587 is understandable, and may even be well-intentioned. The bill requires platforms to provide to the attorney general a “terms of service report” that includes policies for and accounting of content moderation practices. But to enforce this, the bill creates an expansive net, allowing virtually any city or county prosecutor to bring a complaint alleging deficit in the terms of service report, and collect any financial penalties for local benefit.

Compounding this, among its list of violations AB 587 includes whether the report “materially omits or misrepresents required information.” Such vague language, combined with the ability of any prosecutor in any court to bring a complaint, means that in all likelihood, soon after the law’s passage, politically motivated lawsuits will be brought against one or more social media companies.

These lawsuits will follow the same pattern of abuse as Texas Attorney General Ken Paxton in his lawsuit against Twitter. Paxton’s actions were designed to punish Twitter for suspending the account of former President Donald J. Trump. Somewhere in California, if AB 587 passes, a prosecutor will bring a political, punitive case against a social media company, claiming that the platform has made a material misrepresentation and that its “true” content moderation practices involve secret bias or undisclosed “shadowbanning.” And in a friendly local court, that prosecutor could win an initial favorable judgment. Eventually, the platform will probably prevail in court, but it may take multiple appeals and result in wasteful litigation costs, both for the company and for the taxpayers in the jurisdiction in which the suit was filed.

California is well aware of the potential for abuse of private litigation for political purposes, and has a robust anti-SLAPP statute in place. So-called “strategic lawsuits against public participation” are brought by plaintiffs to create legal costs that repress free expression. To protect against this abuse of the legal system, anti-SLAPP laws make it easy and quick to dispose of such ill-intentioned lawsuits.

Today, it is not only individuals, but democratically elected officials using the power of the court system to pursue their political agendas. It only takes one prosecutor and one court to create a massive problem.

The idea behind AB 587 may be valid. But the nature of its transparency obligations, the breadth of potential political enforcement and the vague language of misrepresentation as a violation combine to allow for manipulation of the law for illegitimate and harmful purposes. Revisions to any of these mechanisms—narrowing the scope of disclosure, clarifying the nature of a violation, or limiting the number of potential prosecutors—could address this concern.

But AB 587 as drafted dramatically increases the scope of risk of politicized regulation, and must be further revised or rejected to eliminate that possibility.