Musa bin Talha reported it on the authority of his father: The Messenger of Allah (ﷺ) said: When one of you places in front of him something such as the back of a saddle, he should pray without caring who passes on the other side of it.
Hadith ReferenceSahih Muslim / The Book of Prayers / Hadith: 499