Sahih al-Bukhari 7045
Book 91: Interpretation of Dreams · Hadith 59
Hadith text
Narrated Abu Sa`id Al-Khudri:I heard Allah's Messenger (ﷺ) saying, "If anyone of you saw a dream which he liked, then that was from Allah, and he should thank Allah for it and tell it to others; but if he saw something else, i.e, a dream which he did not like, then that is from Satan and he should seek refuge with Allah from it and should not tell it to anybody for it will not harm him
Abu Saeed Al-Khudri bataate hain: Maine Allah ke Rasool (SAW) ko ye kehte suna, 'Agar tum mein se koi aisa khwaab dekhe jo use pasand ho, to wo Allah ki taraf se hai, aur use iske liye Allah ka shukriya adaa karna chaahiye aur ise doosron ko batana chaahiye; magar agar wo kuch aur dekhe, yaani aisa khwaab jo use napasand ho, to wo Shaitaan ki taraf se hai aur use isse Allah ki panaah maangni chaahiye aur ise kisi ko nahi batana chaahiye, kyunke isse use nuqsaan nahi hoga.'
Sahih al-Bukhari 7045 · Book 91, Hadith 59