In the US it is perfectly legal for journalists to distribute classified information, as long as they don't hold a security clearance themselves. I think this strikes the right balance. Note that a journalist can still be prosecuted for breaking other laws like theft, computer abuse, or conspiracy if they use illegal means to obtain the information. But that's separate from publishing the information once they have it.