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.
ahmad:820ʿAffān > Ḥammād b. Salamah > al-Ḥajjāj > al-Ḥasan b. Saʿd from his father > Yuḥannas And Ṣafiyyah Kānā from Saby al-Khumus Fazanat Ṣafiyyah Birajul from al-Khumus Fawaladat Ghulām Fāddaʿāh al-Zānī Wayuḥannas Fākhtaṣamā > ʿUthmān b. ʿAffān Farafaʿahumā > ʿAlī b. Abū Ṭālib

I shall pass judgement between them as the Messenger of Allah ﷺ passed judgement: the child belongs to (the husband) of the women and the fornicator gets nothing. And he gave them fifty lashes each.  

أحمد:٨٢٠حَدَّثَنَا عَفَّانُ حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ أَخْبَرَنَا الْحَجَّاجُ عَنِ الْحَسَنِ بْنِ سَعْدٍ عَنْ أَبِيهِ أَنَّ يُحَنَّسَ وَصَفِيَّةَ كَانَا مِنْ سَبْيِ الْخُمُسِ فَزَنَتْ صَفِيَّةُ بِرَجُلٍ مِنَ الْخُمُسِ فَوَلَدَتْ غُلامًا فَادَّعَاهُ الزَّانِي وَيُحَنَّسُ فَاخْتَصَمَا إِلَى عُثْمَانَ بْنِ عَفَّانَ فَرَفَعَهُمَا إِلَى عَلِيِّ بْنِ أَبِي طَالِبٍ فَقَالَ

عَلِيٌّ أَقْضِي فِيهِا بِقَضَاءِ رَسُولِ اللهِ ﷺ الْوَلَدُ لِلْفِرَاشِ وَلِلْعَاهِرِ الْحَجَرُ وَجَلَدَهُمَا خَمْسِينَ خَمْسِينَ