Yazid bin Sharik Taymi reported,

Ali bin Abu Talib addressed us and said, "Whoever claims that we possess anything we recite besides the Book of Allah and this scroll has lied." The scroll was hanging in the sheath of his sword, and it contained rulings about the ages of camels used for blood-money and matters concerning injuries.It also recorded that the Prophet ﷺ said, "Madinah is a sanctuary, the area between Ayr and Thawr. Whoever introduces a heresy in it or shelters one who does so, upon him is the curse of Allah, the angels, and all people. Allah will accept from him neither obligatory worship nor voluntary on the Day of Resurrection. The protection granted by the Muslims is one, even the lowest of them may extend it. Whoever claims as his father someone other than his real father, or attaches himself to people other than his true patrons, upon him is the curse of Allah, the angels, and all people. Allah will accept from him neither obligatory worship nor voluntary on the Day of Resurrection."

Muslim 3794

Sahih

و حدثنا أبو كريب حدثنا أبو معاوية حدثنا الأعمش

عن إبراهيم التيمي عن أبيه قال

خطبنا علي بن أبي طالب فقال من زعم أن عندنا شيئا نقرؤه إلا كتاب الله وهذه الصحيفة قال وصحيفة معلقة في قراب سيفه فقد كذب فيها أسنان الإبل وأشياء من الجراحات وفيها قال النبي ﷺ المدينة حرم ما بين عير إلى ثور فمن أحدث فيها حدثا أو آوى محدثا فعليه لعنة الله والملائكة والناس أجمعين لا يقبل الله منه يوم القيامة صرفا ولا عدلا وذمة المسلمين واحدة يسعى بها أدناهم ومن ادعى إلى غير أبيه أو انتمى إلى غير مواليه فعليه لعنة الله والملائكة والناس أجمعين لا يقبل الله منه يوم القيامة صرفا ولا عدلا

مسلم 3794صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Emancipation of slaves
Chapter
Prohibition of a freed slave taking patrons other than his own
Numbering
Darussalam 3794
Muslim 3794