Arguably someone has broken privacy laws (I note here that where they are located matters because it depends under what jurisdiction they fall). Information that was not public possibly has become public.
The IBA were in a difficult position, because they had previously ruled one way and were asked to clarify that information. The question is did someone reveal more than they should?
This doesn't take away from the question of fairness in sport though and safety reasons to be asking those questions.
In the UK you could potentially argue a defence based on it 'being in the public interest' to make a point about it (The likes of JKR are almost certainly fine in UK law).
Then there's harassment. Harassment can be going further than making a public interest case. This involves levels of contact and the amount of talking about the subject and how personal it gets. There's a difference between talking about someone's chromosomes and testosterone on a technical level and then talking about say how hairy someone is or how they've bulges in certain places or particular feminine/masculine personality traits. Are these things relevant to ability to box is the basic point here I think.
Has harassment occurred? I'd argue it probably has. Is there a good reason to still discuss this case - yes it falls under the public interest - and there's are ways to do this without being harassing.
Crucially I would argue here that the IOC have failed everyone involved though. They have not dealt with the initial issue which has left the two boxers in question exposed. They have failed to protect them. Protecting them might have included banning them from the word go because the IOC should have seen this issue was going to blow up and they should have been prepared for it. Saying they are female cos of their passports was never going to be sufficient. They needed to have scientific evidence to back up why their position of 'ending invasive sex tests' was acceptable, safe and fair. They needed to have scientific evidence to back up why athletes with a testosterone level due to medical reasons higher than accepted level under anti-doping rules was safe and fair in a contact sport when non contact sports have already ruled it is not and crucially have been backed by the international sport arbitration court about this. They needed to have a good argument about why a sex test is invasive but accepted anti-doping tests are not invasive because the IOC backs anti-doping and the position about sex testing is incoherent as an argument next to it.
The IOC could have stopped two athletes becoming sucked into a huge international debate. They choose not. They have argued they were on the side of those two athletes but their position was always going to result in this situation and it was entirely foreseeable. That's not protecting athletes. That's setting them up deliberately to make a point and to hell with the IOCs responsibilities.
This will only intensify the debate on this too. An harassment claim isn't the solution. The solution is in demonstrating there's not a problem on both an individual and wider scientific level.
The funny thing is, winning the gold is likely to be counter productive in the longer run, because all it does is reinforce the feeling of unfairness. That just reinforces determination in the long run to demonstrate a scientific problem.
These boxers might find themselves in a few years time trying to argue they won fairly but wouldn't be eligible because of a rule change which is brought in for fairness and safety.
They been handed a poison chalice by the IOC.
An harassment claim is extremely unwise under the circumstances even if it's thought of as likely winnable. Lawyers are, again, using the situation for their own gain not the overall best interests of the individual concerned. Precisely because the IOCs position is unlikely to be tenable in the long run.
I feel sorry for the two involved. The IOC has let them down badly. All entirely preventable and foreseeable after Caster.
It's appalling.