Hadith.849 - Muhammad ibn Abi Hamzah narrated from Imam Abu al-Hasan al-Awwal عليه السلام that He said:
"If a seepage (liquid or discharge) appears behind a latrine (toilet) and it is in the direction of the Qiblah, one should cover it with something."
Nothing that passes in front of a Muslim while he is praying — whether it be a dog, a woman, a donkey, or anything else — invalidates the prayer.