The Espionage Act is a highly suspect piece of Woodrow Wilson legislation from World War I. I can’t imagine a judiciary steeped in years of liberal education with the horror stories of persecuted Anarchists would ever find it to be Constitutional.
It was found Constitutional (unanimously!) shortly after it was enacted.
Subsequent decisions have cast doubt on it, but none overruled it.
http://en.wikipedia.org/wiki/Espionage_Act_of_1917#The_Act_in_the_courts