Mishkat al-Masabih
Mishkat al-Masabih 4612
وَعَنْ أَبِي قَتَادَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «الرُّؤْيَا الصَّالِحَةُ مِنَ اللَّهِ وَالْحُلْمُ مِنَ الشَّيْطَانِ فَإِذَا رَأَى أَحَدُكُمْ مَا يُحِبُّ فَلَا يُحَدِّثُ بِهِ إِلَّا مَنْ يُحِبُّ وَإِذَا رَأَى مَا يَكْرَهُ فَلْيَتَعَوَّذْ بِاللَّهِ مِنْ شَرِّهَا وَمِنْ شَرِّ الشَّيْطَانِ وَلْيَتْفُلْ ثَلَاثًا وَلَا يُحَدِّثْ بِهَا أحدا فَإِنَّهَا لن تضره»
It is related from Abu Qatadah that the Messenger of Allah (may Allah bless him and grant him peace) said, “A righteous dream is from Allah, and a bad dream is from Satan. If one of you sees something he likes, let him tell only someone he loves. If he sees something he dislikes, let him seek refuge in Allah from its evil and from Satan, spit lightly three times, and tell no one about it; then it will not harm him.”