(34) باب أَمْرِ مَنْ مَرَّ بِسِلاَحٍ فِي مَسْجِدٍ أَوْ سُوقٍ أَوْ غَيْرِهِمَا مِنَ الْمَوَاضِعِ الْجَامِعَةِ لِ
Jabir reported that Allah's Messenger (ﷺ) commanded a person who had been distributing arrows freely in the mosque that he should not move about in the mosque but by catching hold of their iron-heads. Ibn Rumh narrated this with a slight variation of wording.
Reference: Sahih Muslim 2614 c
In-book reference: Book 45, Hadith 160
USC-MSA web (English) reference(deprecated numbering scheme): Book 32, Hadith 6333