Rights groups say the measure infringes on the freedom of speech of Americans for the benefit of a foreign nation.