Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:12:23

And she, in whose house he was, sought to seduce him. She closed the doors and said, "Come, you." He said, "˹I seek˺ the refuge of Allah. Indeed, he is my master, who has made good my residence. Indeed, wrongdoers will not succeed."  

And she, in whose house he was — namely Zulaykhā — attempted to seduce him, that is, she asked him to lie with her, and she closed the doors, of the house. And she said, to him: ‘Come!’ (hayta laka: the lām ˹of laka˺ is for clarification; a variant reading has hīta laka or haytu laka). ‘God forbid!’, I seek refuge with God from this, he said. ‘Truly he, who bought me, is my lord, my master, who has given me an honourable place, ˹an honourable˺ residence, and so I cannot betray him with regard to his family. Truly, evildoers, fornicators, never prosper’.
القرآن:١٢:٢٣

وَرَاوَدَتْهُ الَّتِي هُوَ فِي بَيْتِهَا عَنْ نَفْسِهِ وَغَلَّقَتِ الْأَبْوَابَ وَقَالَتْ هَيْتَ لَكَ ۚ قَالَ مَعَاذَ اللَّهِ ۖ إِنَّهُ رَبِّي أَحْسَنَ مَثْوَايَ ۖ إِنَّهُ لَا يُفْلِحُ الظَّالِمُونَ  

{وراودته التي هو في بيتها} هي زليخا {عن نفسه} أي طلبت منه أن يواقعها {وغلَّقت الأبواب} للبيت {وقالت} له {هيْت لك} أي هلم واللام للتبيين وفي قراءة بكسر الهاء وأخرى بضم التاء {قال معاذ الله} أعوذ بالله من ذلك {إنه} الذي اشتراني {ربي} سيدي {أحسن مثواي} مقامي فلا أخونه في أهله {إنه} أي الشأن {لا يفلح الظالمون} الزناة.