Mishkat al-Masabih #314
Purification
The Arabic includes the chain of narration (sanad) and the collector's commentary; the English translation shows the Prophet's words only.
وَعَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: اتَّقُوا اللَّاعِنَيْنِ. قَالُوا: وَمَا اللَّاعِنَانِ يَا رَسُولَ اللَّهِ؟ . قَالَ: «الَّذِي يَتَخَلَّى فِي طَرِيقِ النَّاس أَو فِي ظلهم» . رَوَاهُ مُسلم
Abu Huraira reported God's messenger as saying, "Guard against the two things which produce cursing.” He was asked what they were and said, "Relieving oneself where people walk, or where they sit in the shade.”
Muslim transmitted it.
Topics
About Mishkat al-Masabih
This hadith is #314 from Mishkat al-Masabih, in the Book of Purification.