Last spring, 10 people were killed in a racially motivated mass killing at a predominantly Black grocery store in Buffalo. It was the 198th mass shooting of the year, with 450 to follow before the year was out. Acts of mass violence like these shake the foundations of our society, making people fearful when they shop for groceries, attend church, or go to school. They can also make people less willing to exercise important First Amendment rights—including the right to dissent, to assemble publicly, and to protest—because they do not feel safe doing so.

Just months after the Buffalo massacre, and days after the U.S. Supreme Court struck down New York’s longstanding concealed-carry law, New York passed a replacement law. Most of the law’s new requirements are well-founded; the state has a strong interest in regulating access to guns, and limits on concealed-carry can serve important First Amendment values by facilitating peaceful engagement in civic life and public discourse.

But one of the new law’s provisions undermines those same values. Anyone applying for a concealed-carry license must provide the state with a list of all of their social media accounts used in the last three years, so that the state can assess whether they have “good moral character.”

A federal appeals court will consider the constitutionality of New York’s concealed-carry law, including this social media registration requirement, today. That provision, however well-intentioned, is misguided and violates the First Amendment.

This dragnet collection of social media information by the government has a chilling effect on applicants’ exercise of their right to speak and associate with others online. The statute requires a list of all “social media accounts”—a broad term that includes platforms like Goodreads, MyFitnessPal, LinkedIn, and countless others that are unlikely to shed light on whether applicants are likely to harm themselves or others.

Disclosing those accounts will, however, expose a wealth of personal information to government scrutiny. Faced with the knowledge that the government is watching, many will censor what they say, not knowing how it might be interpreted. They may also stop engaging on social media with controversial individuals or groups—think Black Lives Matter, pro- or anti-abortion groups, or gun advocacy organizations. These harms are even greater for people who use pseudonyms on their social media accounts to protect their privacy or out of fear of retaliation, and who will be forced to give up their right to speak anonymously online in exchange for a license.