He passed by Hasan bin Ali while he was praying with his braid coiled at the back of his head, and he untied it. Hasan turned toward him angrily, so he said, "Attend to your prayer and do not be angry, for I heard the Messenger of Allah ﷺ say, 'That is the seat of Satan.'"
حدثنا يحيى بن موسى حدثنا عبد الرزاق أخبرنا ابن جريج عن عمران بن موسى عن سعيد بن أبي سعيد المقبري عن أبيه
أنه مر بالحسن بن علي وهو يصلي وقد عقص ضفرته في قفاه فحلها فالتفت إليه الحسن مغضبا فقال أقبل على صلاتك ولا تغضب فإني سمعت رسول الله ﷺ يقول ذلك كفل الشيطان
Its isnad is hasan. Abu Dawud narrated it in the Book of Prayer, chapter on a man praying with his hair tied back, hadith 646, from Abdul-Razzaq's version, and it is also found in his Musannaf, hadith 2991. Ibn Jurayj explicitly stated that he heard it directly in his version. Ibn Khuzayma graded it sahih, hadith 911, as did Ibn Hibban, hadith 474, and Hakim, 12/261, 262, and Dhahabi. Imran bin Musa is hasan al-hadith, and the majority of scholars considered him reliable.On this subject there is also a narration from Umm Salama [Ibn Abu Hatim in Al-Ilal, Tuhfat al-Ahwazi 1/298], and from Abdullah bin Abbas [Bukhari, hadith 815, and Muslim, hadith 490 and 232492].