Sharaha al-Hamdaniyyah came to Ali and said, "I have committed adultery."He said, "Perhaps you are jealous? Perhaps you saw it in a dream? Perhaps you were forced?"To each she replied, "No."So he flogged her on Thursday and stoned her on Friday, and he said, "I flogged her by the Book of Allah and stoned her by the Sunnah of the Prophet of Allah ﷺ."
حدثنا محمد بن جعفر حدثنا سعيد عن قتادة
أن شراحة الهمدانية أتت عليا رضي الله عنه فقالت إني زنيت فقال لعلك غيرى لعلك رأيت في منامك لعلك استكرهت فكل تقول لا فجلدها يوم الخميس ورجمها يوم الجمعة وقال جلدتها بكتاب الله ورجمتها بسنة نبي الله ﷺ
Its isnad is sahih, and it is a longer version of 839. See also 978.