Sahih Muslim , Book 53, Hadith 59 (In-Book)

Abu Huraira reported Allah's Messenger as say- ing: Many a people with dishevelled hair are driven away from the door (but they are so pious) that if they are to swear in the name of Allah, He would definitely fulfil that.

حَدَّثَنِي سُوَيْدُ بْنُ سَعِيدٍ، حَدَّثَنِي حَفْصُ بْنُ مَيْسَرَةَ، عَنِ الْعَلاَءِ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ رُبَّ أَشْعَثَ مَدْفُوعٍ بِالأَبْوَابِ لَوْ أَقْسَمَ عَلَى اللَّهِ لأَبَرَّهُ ‏" ‏ ‏.‏

sunnah.com