The Messenger of Allah ﷺ said, "While a dog was circling around a well, nearly dying of thirst, a prostitute from among the prostitutes of the Children of Israil saw it. She removed her leather sock, drew water with it, and gave the dog a drink. Because of this, she was forgiven."
قال رسول الله ﷺ: بينما كلب يطيف بركية قد كاد يقتله العطش، إذ رأته بغي من بغايا بني إسرائيل فنزعت موقها، فاستقت له به فسقته إياه، فغفر لها به.
Bukhari narrated it in the chapters on the prophets (3467), and Muslim in the book on greeting (2245), both from the hadith of Abdullah bin Wahb, who said, Jareer bin Hazim told me, from Ayub Sakhtiyani, from Muhammad bin Sirin, from Abu Hurairah, and he related it.His saying, "the muq" refers to the leather sock. And his saying, "the rakiyyah" means the well.