وَسُئِلَ مَالِك عَنْ صَلَاةِ الْأَسِيرِ ، فَقَالَ : مِثْلُ صَلَاةِ الْمُقِيمِ إِلَّا أَنْ يَكُونَ مُسَافِرًا
Imam Malik, may Allah have mercy on him, was asked about the prayer of a prisoner. He replied that the prisoner should pray like a resident, but if he is a traveler, then he should shorten the prayer.