The Prophet ﷺ said, "Allow women to come to the mosque at night."His son said to him, "By Allah, we will not allow them. They will use this as a means of mischief."He replied, "May Allah do such and such to you, may Allah do such and such to you. You hear me say, 'The Messenger of Allah ﷺ said,' and you say, 'No'?"Layth said, "But let them go out unperfumed."
حدثنا عبد الرزاق أخبرنا سفيان عن الأعمش وليث عن مجاهد
قال النبي ﷺ ائذنوا للنساء بالليل إلى المسجد فقال له ابنه والله لا نأذن لهن يتخذن ذلك دغلا فقال فعل الله بك وفعل الله بك تسمعني أقول قال رسول الله ﷺ وتقول أنت لا قال ليث ولكن ليخرجن تفلات
Its isnad is sahih. Sufyan is Thawri. The hadith is a repetition of 6101 and 6296, from the narration of Amash from Mujahid, and a longer version of 5725, from the narration of Layth bin Abu Salim from Mujahid. See also 5021, 5101, 6303, 6304.