Shaddad b. Aus reported God’s Messenger as saying, “Act differently from the Jews, for they do not pray in their sandals or their shoes.”*
* Khuff (pl. khifaf), an article of footwear which came up above the ankle. Traditions tell that the Prophet allowed pilgrims to wear the khuff only when unable to procure sandals, but said they must be cut to come below the ankle. Cf. Bukhari, Hajj, 21, 23; Libas, 8, 4, 15, 73.
While God’s Messenger was leading his companions in prayer he took off his sandals and laid them at his left side; so when the people saw that, they removed their sandals. When he had finished his prayer he asked, "What made you remove your sandals? They replied, “We saw you remove yours, so we removed ours.” God’s Messenger then said, “Gabriel came to me and informed me that there was filth on them. When any of you comes to the mosque he should examine, and if he sees filth on his sandals he should wipe it off and pray in them.”
Umm Salama said that she asked God's Messenger whether a woman might pray in a shift and veil without wearing a lower garment. He replied, “If the shift is ample and covers the surface of her feet.”
Abu Dawud transmitted it and he mentioned a number who did not trace it beyond Umm Salama.