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.
bayhaqi:21181Abū al-Ḥasan ʿAlī b. Muḥammad b. Yūsuf al-Raffāʾ al-Baghdādī > ʿUthmān b. Muḥammad b. Bishr > Ismāʿīl b. Isḥāq > Ibn Abū Ūways > ʿAbd al-Raḥman b. Abū al-Zinād from his father

[Machine] About the scholars who adhere to the view of the people of Madinah, they used to say about the child of adultery that its origin is indeed an origin of evil, but if its condition and status improve, its testimony becomes valid. They also viewed freeing it as a good deed.  

البيهقي:٢١١٨١أَخْبَرَنَا أَبُو الْحَسَنِ عَلِيُّ بْنُ مُحَمَّدِ بْنِ يُوسُفَ الرَّفَّاءُ الْبَغْدَادِيُّ أنبأ عُثْمَانُ بْنُ مُحَمَّدِ بْنِ بِشْرٍ ثنا إِسْمَاعِيلُ بْنُ إِسْحَاقَ ثنا ابْنُ أَبِي أُوَيْسٍ ثنا عَبْدُ الرَّحْمَنِ بْنُ أَبِي الزِّنَادِ عَنْ أَبِيهِ

عَنِ الْفُقَهَاءِ الَّذِينَ يُنْتَهَى إِلَى قَوْلِهِمْ مِنْ أَهْلِ الْمَدِينَةِ كَانُوا يَقُولُونَ فِي وَلَدِ الزِّنَا إِنَّ أَصْلَهُ لَأَصْلُ سُوءٍ وَإِذَا حَسُنَتْ حَالَتُهُ وَمُرُوءَتُهُ جَازَتْ شَهَادَتُهُ وَكَانُوا يَرَوْنَ عِتْقَهُ حَسَنًا