The Book of Virtue, Enjoining Good Manners, and Joining of the Ties of Kinship
حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ نُمَيْرٍ، حَدَّثَنَا أَبِي، حَدَّثَنَا الأَعْمَشُ، عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " اللَّهُمَّ إِنَّمَا أَنَا بَشَرٌ فَأَيُّمَا رَجُلٍ مِنَ الْمُسْلِمِينَ سَبَبْتُهُ أَوْ لَعَنْتُهُ أَوْ جَلَدْتُهُ فَاجْعَلْهَا لَهُ زَكَاةً وَرَحْمَةً " .Abu Huraira reported Allah's Messenger (ﷺ) as saying:O Allah, I am a human being and for any person amongst Muslims upon whom I hurl malediction or invoke curse or give him whipping make it a source of purity and mercy
From Sahih Muslim, whose reports the scholars accept as authentic.