Abu Huraira reported God’s messenger as saying, “When a dog drinks out of a vessel belonging to any of you, he must wash it seven times,”
(Bukhari and Muslim) In a version by Muslim he said, “When a dog laps the water in a vessel belonging to any of you, he must wash it seven times, using earth the first time.”
He also said that when a desert Arab got up and passed water in the mosque the people took hold of him, but the Prophet said to them,
“Leave him alone, and pour a bucket* of water over what he has passed, for you have been sent only to make things easy and not to make things difficult.”
*The text has sajl au dhanub, the transmitter not being sure which word was used. Both mean a bucket.
Abu Sa'id al-Khudri said that God's messenger was asked about the purity of the cisterns between Mecca and Medina to which beasts of prey, dogs and asses go down, and replied, “They have what they carry in their bellies, and we have what is left as pure water.”