Nasr saw Abdullah bin Harith praying with his hair tied up behind his head, so he stood up and began to undo it. When Abdullah finished his prayer, he turned to Ibn Abbas and asked, "What business do you have with my head?"Ibn Abbas replied, "I heard the Messenger of Allah ﷺ say, 'The example of one who prays like this is like the example of one who prays while bound with his hands tied behind his back.'"
أخبرنا عمرو بن سواد بن الأسود بن عمرو السرحي من ولد عبد الله بن سعد بن أبي سرح قال أنبأنا ابن وهب قال أنبأنا عمرو بن الحارث أن بكيرا حدثه أن كريبا مولى ابن عباس حدثه
أنه رأى عبد الله بن الحارث يصلي ورأسه معقوص من ورائه فقام فجعل يحله فلما انصرف أقبل إلى ابن عباس فقال ما لك ورأسي قال إني سمعت رسول الله ﷺ يقول إنما مثل هذا مثل الذي يصلي وهو مكتوف
Bukhari... wait, this is a citation reference.Muslim narrated it, in the Book of Prayer, chapter on the limbs of sujud and the prohibition of tucking up one's hair etc., hadith no. 492, from Amr bin Sawwad, through the same chain. It is also in Kubra, hadith no. 701.