Sayyiduna Abu Hurayrah (may Allah be pleased with him) said: I heard the Prophet (peace and blessings be upon him); he (peace and blessings be upon him) said: "All of my Ummah will be pardoned except those who sin openly (al-mujahirun). The one who sins openly is he who does a deed at night and Allah conceals it for him, and then in the morning he tells people, 'I did this.' Allah had concealed it for him during the night, and he uncovers Allah's concealment."
Imam al-Shafi'i (may Allah have mercy on him) said: It is narrated through a disconnected chain that the Messenger of Allah (peace and blessings be upon him) said: "Whoever is afflicted with anything of this filth, let him observe Allah's concealment; and whoever discloses his disgrace before us, we will carry out the hadd on him according to the Book of Allah."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأشربة والحد فيها / 17599