In the United States, at least, it’s not illegal* for regular citizens to publish leaked documents of whatever status. It is illegal for security clearance holders to access information they’re not cleared for, regardless of where that info is. If an Internet forum allows classified leaks, that would make it difficult for security clearance holders to safely browse that forum.
There are statutes on the books that would punish this type of behavior, but they are usually considered to be unenforceable because of the first amendment to the Constitution. Julian Assange was a notable example of a non security clearance holder non-US citizen who was prosecuted under the Espionage Act. (Or at least an attempted prosecution that never quite cleared extradition…)
In the United States, at least, it’s not illegal* for regular citizens to publish leaked documents of whatever status. It is illegal for security clearance holders to access information they’re not cleared for, regardless of where that info is. If an Internet forum allows classified leaks, that would make it difficult for security clearance holders to safely browse that forum.