Sahih Muslim 3363
The Book of Pilgrimage
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُوسَى، حَدَّثَنَا أُسَامَةُ بْنُ زَيْدٍ، عَنْ أَبِي عَبْدِ اللَّهِ الْقَرَّاظِ، قَالَ سَمِعْتُهُ يَقُولُ سَمِعْتُ أَبَا هُرَيْرَةَ، وَسَعْدًا، يَقُولاَنِ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " اللَّهُمَّ بَارِكْ لأَهْلِ الْمَدِينَةِ فِي مُدِّهِمْ " . وَسَاقَ الْحَدِيثَ وَفِيهِ " مَنْ أَرَادَ أَهْلَهَا بِسُوءٍ أَذَابَهُ اللَّهُ كَمَا يَذُوبُ الْمِلْحُ فِي الْمَاءِ " .
Abu Huraira and Sa'd reported Allah's Messenger (way peace be upon him) as saying:O Allah, bless the people of Medina in their mudd, the rest of the hadith being the same, and in It (this is also mentioned):" He wo intends to do harm to its people, Allah would efface him just as salt it dissolved in water
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.