Civil rights groups and legal scholars said the new measure would violate constitutional free speech rights and would likely draw legal challenges.