[Concerning worship, the companions of the prophet, the wiping on socks and nabidh]
وَتَجُوزُ الصَّلَاةُ خَلْفَ كُلِّ بَرٍّ وَفَاجِرٍ ، وَيُصَلِّى عَلَى كُلِّ بَرٍّ وَفَاجِرٍ .
039- Worship (ṣalā) is allowable behind anyone [acting as Imam], whether righteous (birr) or immoral (fājir); and worship is to be performed for anyone whether righteous or immoral.