The Messenger of Allah ﷺ said: Be on your guard against two things which provoke cursing. They (the companions present there) said: Messenger of Allah, what are those things which provoke cursing? He said: Easing on the thoroughfares or under the shades (where they take shelter and rest). (Using translation from Muslim 269)
أَنَّ النَّبِيَّ ﷺ قَالَ اتَّقُوا اللَّاعِنَيْنِ قَالُوا وَمَا اللَّاعِنَانِ ؟ يَا رَسُولَ اللهِ قَالَ الَّذِي يَتَخَلَّى فِي طَرِيقِ النَّاسِ أَوْ فِي ظِلِّهِمْ