Critics have blasted the measure as a way to intimidate people “trying to shine light on bad behavior.”