Hazrat Sha'bi (may Allah have mercy on him) says that if Shurayh had been the judge, he would certainly have imprisoned him for this act.