It is narrated from Sayyiduna Abu Shahm (may Allah be pleased with him), who (at one time) used to be absorbed in play and idle pursuits, that he said: "A girl passed by me on one of the roads of Madinah, and I reached out my hand towards her side (and touched her). The next day, when people came to the Messenger of Allah (peace and blessings be upon him) to pledge allegiance, I too came to him (peace and blessings be upon him) and stretched out my hand to pledge allegiance, but he (peace and blessings be upon him) withdrew his blessed hand and asked: 'Are you the one who committed that indecent act yesterday?' I said: O Messenger of Allah (peace and blessings be upon him)! Take my pledge; I will never do such a thing again. At this he (peace and blessings be upon him) said: 'Then that is fine.'"
Hadith Referenceمسند أبي يعلى الموصلي / مسند أبي شهم / 1543