Abu Salama reported,

I used to have dreams that would leave me shaken, but I would not wrap myself in a cover, until I met Abu Qatada and mentioned this to him.He said, "I heard the Messenger of Allah ﷺ say, 'True dreams are from Allah, and bad dreams are from Satan. So when one of you has a dream that he dislikes, let him spit lightly to his left three times and seek refuge in Allah from its evil, and it will not harm him.'"

Muslim 5897

Sahih

حدثنا عمرو الناقد وإسحق بن إبراهيم وابن أبي عمر جميعا عن ابن عيينة واللفظ لابن أبي عمر حدثنا سفيان عن الزهري

عن أبي سلمة قال

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

مسلم 5897صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Dreams
Chapter
Recitation of poetry, identifying the most poetic expression, and condemnation of poetry
Numbering
Darussalam 5897
Muslim 5897