"Why don't you pledge to me upon that which the women have pledged: That you will not associate anything with Allah, that you will not steal, that you will not have unlawful sexual relations, that you will not utter slander, fabricating from between your hands and feet, and that you will not disobey me in goodness (Ma'ruf)?" We said: "yes, O Messenger of Allah." So we gave him our pledge, on that basis. The Messenger of Allah said: "Whoever commits any of these actions after that, and is punished, that will be an expiation. Whoever is not punished, then his affair is up to Allah; if He wills, He will forgive him, and if He wills, He will punish him."
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ أَلاَ تُبَايِعُونِي عَلَى مَا بَايَعَ عَلَيْهِ النِّسَاءُ أَنْ لاَ تُشْرِكُوا بِاللَّهِ شَيْئًا وَلاَ تَسْرِقُوا وَلاَ تَزْنُوا وَلاَ تَقْتُلُوا أَوْلاَدَكُمْ وَلاَ تَأْتُوا بِبُهْتَانٍ تَفْتَرُونَهُ بَيْنَ أَيْدِيكُمْ وَأَرْجُلِكُمْ وَلاَ تَعْصُونِي فِي مَعْرُوفٍ قُلْنَا بَلَى يَا رَسُولَ اللَّهِ فَبَايَعْنَاهُ عَلَى ذَلِكَ فَقَالَ رَسُولُ اللَّهِ ﷺ فَمَنْ أَصَابَ بَعْدَ ذَلِكَ شَيْئًا فَنَالَتْهُ عُقُوبَةٌ فَهُوَ كَفَّارَةٌ وَمَنْ لَمْ تَنَلْهُ عُقُوبَةٌ فَأَمْرُهُ إِلَى اللَّهِ إِنْ شَاءَ غَفَرَ لَهُ وَإِنْ شَاءَ عَاقَبَهُ