The Messenger of Allah ﷺ said, "When one of you is praying, he should not let anyone pass in front of him. Let him push the person away as much as he can, and if he refuses, let him fight him, for he is none other than a devil."
قال قرأت على عبد الرحمن: مالك عن زيد بن أسلم عن عبد الرحمن بن أبي سعيد
قال رسول الله ﷺ إذا كان أحدكم يصلي فلا يدع أحدا يمر بين يديه وليدرأه ما استطاع فإن أبى فليقاتله فإنما هو شيطان
Its isnad is sahih. Abdul-Rahman, narrating from Malik, is Ibn Mahdi. The hadith is found in Muslim 1/362 no. 505, Abu Dawud 1/185 no. 697, Nasai 2/69 no. 757, Ibn Majah 1/307 no. 954, and Darimi 1/384 no. 1411.