Ayesha reported,

Two men came in to see the Messenger of Allah ﷺ and spoke to him about something I do not know what it was, and they angered him, so he cursed them and reviled them. When they left, I said, "Messenger of Allah, no one will gain any good from what these two have just received."He ﷺ asked, "What do you mean?"I said, "You cursed them and reviled them!"He replied, "Do you not know what I have stipulated with my Lord? I said, 'O Allah, I am only a human being, so whichever of the Muslims I curse or revile, make it for him a purification and a reward.'"

Azami 782

Sahih

عن عائشة، قالت

دخل على رسول الله ﷺ رجلان، فكلماه بشيء لا أدري ما هو فأغضباه، فلعنهما وسبهما، فلما خرجا، قلت: يا رسول الله من أصاب من الخير شيئا ما أصابه هذان. قال ﷺ: وما ذاك؟ قالت قلت: لعنتهما وسببتهما! قال: أو ما علمت ما شارطت عليه ربي؟ قلت: اللهم إنما أنا بشر فأي المسلمين لعنته أو سببته، فاجعله له زكاة وأجرا.

الأعظمي 782صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Faith in the Prophet ﷺ
Section
Humanity of the Messenger ﷺ
Numbering
Jami al-Kamil 782 (2nd edition)
Azami 782