Abu Salama reported,

I used to have dreams that would make me ill until I heard Abu Qatada say, "I too used to have dreams that would make me ill until I heard the Prophet ﷺ say, 'A good dream is from Allah. So when one of you sees something he likes, let him not speak of it except to someone he loves. And when he sees something he dislikes, let him seek refuge in Allah from its evil and from the evil of Satan, and let him spit lightly three times, and let him not tell anyone about it, for then it will not harm him.'"

Bukhari 7044

Sahih

حدثنا سعيد بن الربيع حدثنا شعبة عن عبد ربه بن سعيد قال سمعت

أبا سلمة يقول

لقد كنت أرى الرؤيا فتمرضني حتى سمعت أبا قتادة يقول وأنا كنت لأرى الرؤيا تمرضني حتى سمعت النبي ﷺ يقول الرؤيا الحسنة من الله فإذا رأى أحدكم ما يحب فلا يحدث به إلا من يحب وإذا رأى ما يكره فليتعوذ بالله من شرها ومن شر الشيطان وليتفل ثلاثا ولا يحدث بها أحدا فإنها لن تضره

البخاري 7044صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Dream interpretation
Chapter
If one sees something disliked, he should not tell anyone about it nor mention it
Numbering
Darussalam 7044
Bukhari 7044