The Messenger of Allah ﷺ said, "Whoever lifts a curtain and lets his gaze enter a house before being granted permission, and sees the private parts of its inhabitants, has committed a transgression that is not lawful for him to commit. If, the moment he let his gaze in, a man had come forward and gouged out his eyes, I would not hold it against him. But if a man passes by a door that has no curtain and is not closed, and he looks in, there is no sin upon him. The sin is only upon the people of the house."
قال رسول الله ﷺ: من كشف سترا فأدخل بصره في البيت قبل أن يؤذن له، فرأى عورة أهله، فقد أتى حدا لا يحل له أن يأتيه، لو أنه حين أدخل بصره استقبله رجل ففقأ عينيه ما عيرت عليه. وإن مر الرجل على باب لا ستر له غير مغلق فنظر، فلا خطيئة عليه، إنما الخطيئة على أهل البيت.
Tirmidhi (2707) narrated it from Qutayba, who said, Ibn Lahia narrated to us, from Ubaydullah bin Abu Jafar, from Abu Abdul-Rahman Hubli, from Abu Dharr, and he related it.Tirmidhi said, "This is a gharib hadith. We do not know it in this form except through the hadith of Ibn Lahia. Abu Abdul-Rahman Hubli's name is Abdullah bin Yazid."I say, its isnad is hasan, for although Ibn Lahia was weak in memory, the narration of the Abadila from him is more reliable than that of others, and some scholars have added Qutayba bin Saeed to their number. This narration is one of his.Ahmad (21359–21572) narrated it through other routes from Ibn Lahia, part of it in abridged form.As for his saying, "He committed an offense," it means he deserved to be disciplined, because he had committed a reprehensible act that he had no right to commit.As for his saying, "I did not reproach him for it," in Musnad Ahmad it reads, "there would be no blood money," meaning no diya is due for it.