Sahih Bukhari Volume 9, Book 87, Hadith Number 133.

Narrated By Abu Qatada Al-Ansari : (A companion of the Prophet and one of his cavalry men) “I heard Allah’s Apostle saying, “A good dream is from Allah, and a bad dream is from Satan; so, if anyone of you had a bad dream which he disliked, then he should spit on his left and seek refuge with Allah from it, for it will not harm him.”