The Messenger of Allah ﷺ forgot during the prayer and gave the closing salutation after only two prostrations.Dhul-Shimalayn said to him, "Has the prayer been shortened, or did you forget, Messenger of Allah?"The Messenger of Allah ﷺ asked, "Is Dhul-Yadayn telling the truth?"They replied, "Yes."So the Messenger of Allah ﷺ stood up and completed the prayer.
أخبرنا هارون بن موسى الفروي قال حدثني أبو ضمرة عن يونس عن ابن شهاب قال أخبرني أبو سلمة
نسي رسول الله ﷺ فسلم في سجدتين فقال له ذو الشمالين أقصرت الصلاة أم نسيت يا رسول الله قال رسول الله ﷺ أصدق ذو اليدين قالوا نعم فقام رسول الله ﷺ فأتم الصلاة
[Its isnad is sahih] Ibn Khuzayma narrated it, no. 1045, from the hadith of Ibn Shihab Zuhri through this route, and it is in Kubra, no. 564. It has another route in Bukhari, no. 1227 and others, from Abu Salama through this route.Yunus is Ibn Yazid Ayli, and his student Abu Damra is Anas bin Iyad Laythi.