Jabir reported God’s messenger as saying:"When one of you sees a vision which he dislikes he must spit on his left three times, seek refuge in God from the devil three times, and turn from the side on which he was lying." Muslim transmitted it.
Hadith Referenceمشكوة المصابيح / كتاب الرؤيا / 4613
Hadith Gradingالألبانی:صَحِيح | زبیر علی زئی:صحيح
Hadith Takhrij´تحقيق و تخريج: محدث العصر حافظ زبير على زئي رحمه الله` «رواه مسلم (2262/5)»