Abu Sa’id Al-Khudri reported: The Prophet, peace be upon him, said, “If one of you sees a dream he likes, then indeed it is only from Allah so let him praise Allah for it and let him speak about it; and if one of you sees something else he hates, then indeed it is from Satan so let him seek refuge in Allah from its evil and let him not mention it to anyone for indeed it will not harm him.”
[Sahih Bukhari, Book 87, Number 114]
عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ أَنَّهُ سَمِعَ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَقُولُ
إِذَا رَأَى أَحَدُكُمْ رُؤْيَا يُحِبُّهَا فَإِنَّمَا هِيَ مِنْ اللَّهِ
فَلْيَحْمَدْ اللَّهَ عَلَيْهَا وَلْيُحَدِّثْ بِهَا وَإِذَا رَأَى غَيْرَ
ذَلِكَ مِمَّا يَكْرَهُ فَإِنَّمَا هِيَ مِنْ الشَّيْطَانِ فَلْيَسْتَعِذْ
مِنْ شَرِّهَا وَلَا يَذْكُرْهَا لِأَحَدٍ فَإِنَّهَا لَا تَضُرُّهُ
صحيح البخاري كتاب التعبير باب الرؤيا من الله