What would be difference between sharing and publishing, from a legal perspective?
If the same person stole and published I'd expect they could still be prosecuted.
But others resharing it, (eg if someone posted a pastebin and others shared) would not.