I think that freelancers do have some duty not to do things that will inevitably result in making any rational course of foreign relations more difficult.
Though it may be difficult to draw a precise line, I do see a difference between publishing the Pentagon Papers (after the fact), which disclosed the perfidy of the Vietnam War, and just dumping all sorts of personal calumny about foreign leaders – though part of these “dumps” may well have been motivated, like the Pentagon Papers, to show the futility of our sojourn in Afghanistan. (It seems almost impossible that the dumps aren’t violative of all sorts of laws.)
The episode also illustrates how our courtship with technology can be ruinous, by making it so easy to gain access to and disseminate so much classified material through young and immature intelligence operators.