Couldn't we only prosecute them if a war had been officially declared? Not sure how that works.
No.
Whoever knowingly and willfully communicates, furnishes, transmits, or otherwise makes available to an unauthorized person, or publishes, or uses in any manner prejudicial to the safety or interest of the United States or for the benefit of any foreign government to the detriment of the United States any classified information . . . concerning the communication intelligence activities of the United States . . . shall be fined not more than $10,000 or imprisoned not more than ten years, or both [emphasis added].
The applicable law was passed post-WW II as the result of a book published pre-WW II.
Read the article.
NO.1., National security is in force, war or not.
No 2 - Bush didn't go to war without the approval of Congress - why wouldn't it be a 'war'?
Classified information is classied all the time, war or not. Disclosing it is, and always will be a crime.