Abu Hurairah reported,

The Prophet ﷺ said, "There is to be no diminishment in prayer or in the greeting of peace."Ahmad said, "What I understand by this is that you should not give the greeting of peace during prayer, nor should anyone give it to you, and that a man should not shorten his prayer and depart from it while still in doubt about it."

Azami 2596

Sahih

عن أبي هريرة

عن النبي ﷺ، قال: لا غرار في صلاة ولا تسليم قال أحمد: يعني -فيما أرى- أن لا تسلم ولا يسلم عليك. ويغرر الرجل بصلاته فينصرف وهو فيها شاك.

الأعظمي 2596صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
What is prohibited and disliked in prayer
Section
Prohibition of returning the greeting during prayer
Numbering
Jami al-Kamil 2596 (2nd edition)
Azami 2596