Hujayyah bin Adi al-Kindi (may Allah have mercy on him) said: A woman came to Sayyiduna Ali (may Allah be pleased with him) and said: My husband has had intercourse with my slave-girl. Sayyiduna Ali (may Allah be pleased with him) said: If you are truthful, I will stone your husband, and if you are lying, I will flog you. She said: Take me back to my home, take me back to my home.
Imam al-Shafi'i (may Allah have mercy on him) also narrated it and said: This is what we hold, because his zina with his wife's slave-girl is just like zina with anyone else, unless he is one who is excused because of ignorance, saying: I thought she was lawful for me. The Shaykh (may Allah have mercy on him) said: The like of this has also been narrated from Sayyiduna Umar (may Allah be pleased with him) with a good mursal chain.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحدود / 17080