Ali said, "We have nothing except the Book of Allah and this document from the Prophet ﷺ."It states, "Madinah is sacred territory, from Air to such-and-such. Whoever introduces an innovation in it, or shelters one who does so, upon him is the curse of Allah, the angels, and all people. No obligatory or voluntary act will be accepted from him."He also said, "The protection granted by the Muslims is one. Whoever betrays a Muslim's pledge of protection, upon him is the curse of Allah, the angels, and all people. No obligatory or voluntary act will be accepted from him. And whoever claims the patronage of a people without the permission of his own patrons, upon him is the curse of Allah, the angels, and all people. No obligatory or voluntary act will be accepted from him."
ما عندنا شيء إلا كتاب الله، وهذه الصحيفة عن النبي ﷺ: المدينة حرم ما بين عائر إلى كذا، من أحدث فيها حدثا، أو آوى محدثا فعليه لعنة الله والملائكة والناس أجمعين، لا يقبل منه صرف ولا عدل. وقال ذمة المسلمين واحدة فمن أخفر مسلما، فعليه لعنة الله والملائكة والناس أجمعين، لا يقبل منه صرف، ولا عدل، ومن تولى قوما بغير إذن مواليه فعليه لعنة الله والملائكة والناس أجمعين، لا يقبل منه صرف ولا عدل.
Bukhari narrated it in the Virtues of Madinah (1870), and Muslim in Emancipation (1370:20), via Amash, from Ibrahim Taymi, from his father, from Ali, who related it. The wording given is Bukhari's.