حَدَّثَنِي عَمْرٌو النَّاقِدُ، وَزُهَيْرُ بْنُ حَرْبٍ، جَمِيعًا عَنِ ابْنِ عُيَيْنَةَ، - قَالَ زُهَيْرٌ حَدَّثَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، - عَنِ الزُّهْرِيِّ، سَمِعَ سَالِمًا، يُحَدِّثُ عَنْ أَبِيهِ، يَبْلُغُ بِهِ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏"‏ إِذَا اسْتَأْذَنَتْ أَحَدَكُمُ امْرَأَتُهُ إِلَى الْمَسْجِدِ فَلاَ يَمْنَعْهَا ‏"‏ ‏.‏
Translation
Ibn 'Umar reported

The Messenger of Allah (ﷺ) said: Do not prevent women from going to the mosque at night. A boy said to 'Abdullah b. Umar: We would never let them go out, that they may not be caught in evil. He (the narrator) said: Ibn Umar reprimanded him and said.. I am saying that the Messenger of Allah (ﷺ) said this, but you say: We would not allow!