Sayyiduna Abu Qatadah Ansari (may Allah be pleased with him) reports: The Messenger of Allah (peace and blessings be upon him) said: “All of my Ummah will be granted safety except those who commit sins openly.” It was asked: O Messenger of Allah! Who are those who commit sins openly? He (peace and blessings be upon him) said: “Those who commit an evil deed at night, then Allah conceals it for them, but in the morning they say, ‘O so-and-so! I committed such-and-such sins last night,’ thus Allah removes His covering from them.”
Hadith Referenceمعجم صغير للطبراني / كتاب النكاح / 488
Hadith Gradingمحدثین:إسناده ضعيف ولکن حديث صحيح
Hadith Takhrij«إسناده ضعيف ولکن حديث صحيح ، وأخرجه الطبراني فى «الأوسط» برقم: 4498، والطبراني فى «الصغير» برقم: 632، وله شاهد من حديث أبى هريرة الدوسي أخرجه البخاري فى «صحيحه» برقم: 6069، ومسلم فى «صحيحه» برقم: 2990، والبيهقي فى«سننه الكبير» برقم: 17677، والبزار فى «مسنده» برقم: 8096 قال الھیثمی: وفيه عون بن عمارة وهو ضعيف ، مجمع الزوائد ومنبع الفوائد: (10 / 192)»
Narrated Abu Huraira: I heard Allah's Apostle saying. "All the sins of my followers will be forgiven except those of the Mujahirin (those who commit a sin openly or disclose their sins to the people). An example of such disclosure is that a person commits a sin at night and though Allah screens it from the public, then he comes in the morning, and says, 'O so-and-so, I did such-and-such (evil) deed yesterday,' though he spent his night screened by his Lord (none knowing about his sin) and in the morning he removes Allah's screen from himself."
Shaykh Abdul Sattar al-Hammad
Hadith Commentary: (1) Among the attributes of Allah Ta’ala is the attribute of "Sitteer" (the Concealer), meaning He covers faults. Allah Ta’ala conceals many of His servant’s sins in this world, and likewise, in the Hereafter, He will not disgrace or expose His servants. However, there are some people who themselves expose their own faults; they commit sins and then, with brazenness and arrogance, publicize their sins, saying, “Last night I committed such-and-such sins.” This is shamelessness and audacity, which Allah Ta’ala will not forgive.
(2) Allah Ta’ala covers a servant’s sins only when the servant himself also covers his own sins. On the contrary, a person who publicizes his sins angers Allah Ta’ala. Allah Ta’ala will not cover his sins either. A person should, out of modesty before Allah Ta’ala and before people, refrain from publicizing his sins, so that Allah Ta’ala may grant him protection on the Day of Resurrection and not disgrace or humiliate him.
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 6069