Mishkat al-Masabih 339
وَعَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: اتَّقُوا اللَّاعِنَيْنِ. قَالُوا: وَمَا اللَّاعِنَانِ يَا رَسُولَ اللَّهِ؟ . قَالَ: «الَّذِي يَتَخَلَّى فِي طَرِيقِ النَّاس أَو فِي ظلهم» . رَوَاهُ مُسلم
From Abu Hurayrah, may Allah be pleased with him, who said: The Messenger of Allah ﷺ said: "Beware of the two things that bring curses." They said: "And what are the two things that bring curses, O Messenger of Allah?" He said: "The one who relieves himself in people's path or in their shade." Reported by Muslim.