Ali said, "We have nothing except the Book of Allah and this document from the Prophet ﷺ, which states, 'Madinah is sacred from Air to such-and-such a place. Whoever introduces an innovation into it or gives shelter to one who does so will incur the curse of Allah, the angels, and all of mankind...'"
ما عندنا شيء إلا كتاب الله، وهذه الصحيفة عن النبي ﷺ: المدينة حرم ما بين عائر إلى كذا، من أحدث فيها حدثا، أو آوى محدثا فعليه لعنة الله والملائكة والناس أجمعين…
Bukhari narrated it in the Book of Hajj (1870), and Muslim in the Book of Hajj (1370), both from the hadith of Amash, from Ibrahim Taymi, from his father, from Ali bin Abu Talib, and he mentioned it. The wording is Bukhari's, and Muslim's wording is the same.