For example if a woman committed adultery and she admitted to that...
For example if a woman committed adultery and she admitted to that, or it was clearly proven according to Shari'ah criteria[^6], if it were declared that she belonged to certain (reputable) family and the execution of the prescribed punishment would mean the loss of honour of the family in the eyes of the society, then the punishment may not be carried out. And this is applicable to all offences.
[More details about the harms of imprisonment in the following chapter.] For these reasons it is against Islamic law to publish or expose one's secrets of private life through the mass media, such as radio, TV, press and such like, particularly if one was coerced to admit something, which is illegal in two ways.
It is reported from Imam Ali (A): “He who exposes the secret or privacy of his brother, the scandals of his household would be exposed.” [^7] Also reported from Imam Ali (A): “The most evil of the people is he who does not forgive the fault of others and does not keep their secret[^8].” Adultery can only proved if one comes forward and freely admits it - three times, or if the act is witnessed by four adult witnesses.
The rights of Prisoners According to Islamic Teachings (S) said, “Do not pursue the faults of the Muslims, for he who pursues the faults of the Muslims, Allah would pursue his faults, and he who is pursued by Allah, (surely) would be scandalised[^9].” (S) is also quoted as saying, “Allah Almighty has said, “He has opposed me who degrades my faithful servant[^10].” It is preferred for the offender himself, as well as he who witnesses the offence not to expose the event if possible, unless there is other more important priorities involved.
Imam Saadiq (A) is reported as saying, “A man came to (S) and said 'I have committed adultery', then the Prophet (S) said “if he had kept quiet about it and had repented (to Allah sincerely), it would have been better for him[^11]. In another report, a man came to Imam Ali (A) and said, 'O Amir-ul- Mu'minin! I have committed adultery, so purify me.' Imam Ali (A) turned his face away from him, and told the man to sit down.
Imam Ali (A) then turned to the people (who were sitting around him) and said, “Is any of you incapable to shield upon himself, just as Allah has concealed upon him?” The man got up and said, 'O Amir-ul-Mu'minin!