He heard Ibn Abbas being lenient regarding the temporary marriage of women, so he said, "Hold on, Ibn Abbas! The Messenger of Allah ﷺ forbade it on the day of Khaybar, along with the meat of domestic donkeys."
أنه سمع ابن عباس يلين في متعة النساء. فقال: مهلا يا ابن عباس! فإن رسول الله ﷺ نهى عنها يوم خيبر، وعن لحوم الحمر الأهلية.
Muslim narrated it in the chapter on marriage (1407:31) from Muhammad bin Abdullah Ibn Numayr, who said, Our father narrated to us, Abdullah narrated to us, from Ibn Shihab, from Hasan and Abdullah, the two sons of Muhammad bin Ali, from their father, from Ali, and he mentioned it.Bukhari narrated it in the chapter on legal tricks (6961) from Yahya, from Ubaydullah with his chain, and it includes, Ibn Abbas saw no harm in temporary marriage to women, so he said, "The Messenger of Allah ﷺ forbade it on the day of Khaybar, along with the meat of domestic donkeys."Bukhari said, Some people said, "If someone contrives a way to obtain temporary marriage, the marriage is invalid." Others said, "The marriage is valid, but the condition is void."In Sahih Muslim it states that Ali bin Abu Talib said to Ibn Abbas, "The Messenger of Allah ﷺ forbade temporary marriage to women on the day of Khaybar."Yunus narrated it, from Zuhri.