أَخْبَرَنَا أَبُو طَاهِرٍ الْفَقِيهُ وَأَبُو سَعِيدِ بْنُ أَبِي عَمْرٍو ، قَالَا : حَدَّثَنَا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ ، حَدَّثَنَا مُحَمَّدُ بْنُ عُبَيْدِ اللَّهِ بْنِ الْمُنَادِي ، حَدَّثَنَا خَالِدُ بْنُ مَيْسَرَةَ ، وَهُوَ أَبُو حَاتِمٍ الْبَصْرِيُّ ، وَكَانَ يَنْزِلُ مَكَّةَ عَنْ مُعَاوِيَةَ بْنِ قُرَّةَ ، عَنْ أَبِيهِ ، عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ : " مَنْ أَكَلَ مِنْ هَاتَيْنِ الشَّجَرَتَيْنِ الْخَبِيثَتَيْنِ ، فَلَا يَقْرَبَنَّ مَسْجِدَنَا هَذَا ، فَإِنْ كُنْتُمْ لَا بُدَّ آكِلِيهِمَا فَأَمِيتُوهُمَا طَبْخًا " .
It is narrated from Sayyiduna Qurrah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "Whoever eats from these two offensive (foul-smelling) plants, let him not come near this mosque of ours at all. And if you must eat them, then remove their smell by cooking them."
Related hadith on this topic