In June 1917, two months after the United States declared war on Germany, Congress passed the Espionage Act, followed by the Sedition Act in May 1918.
Features of the Espionage Act included granting the president the power to censor publications, and granting power to the postmaster general to not mail material that urged "treason, insurrection, or forcible resistance to any law of the United States."
The Sedition Act forbid any writing or uttering anything "disloyal, profane, scurrilous, or abusive" regarding the US government, military, and flag, and specifically forbid language that held "contempt, scorn, contumely, or disrepute" for those institutions.
Ironically, no one was prosecuted under these acts during the war, but they were later used to suppress "dissident" groups and caused the "Red Scare" of the 1920's. Both acts were later mitigated by several Supreme Court cases, but element of the Acts still remain as Federal Law.
In short, Rights were violated, and government expanded its power, in this case, to prosecute it's own citizens it deemed objectionable.