they hold that prophets are protected from being left to persist in them, especially in matters concerning the conveyance of the message. The Muslim community unanimously agrees that a prophet is protected from being left uncorrected in any error in this regard, since that would contradict the purpose of the message and what the miracle attests to. This is not the place to discuss this at length. The point here is that Allah has never mentioned in His Book a sin committed by any prophet without also mentioning his repentance from it, as in the accounts of Adam, Moses, David, and other prophets.
This is how those who uphold the majority position—that prophets are protected from being left to persist in sin—answer those who deny that prophets commit any sins whatsoever. One of the latter’s strongest arguments is that relied upon by al-Qādī ʿIyād and others, who said:
“We are commanded to follow their example in their actions, and admitting this possibility undermines our following their example.”
The response is that we follow their example only in actions that were allowed to stand. Likewise, the commands and prohibitions they convey may be abrogated, yet admitting this possibility does not negate the obligation to obey, since obedience is obligatory in whatever has not been abrogated. Thus, the absence of abrogation confirms the ruling, and the absence of censure confirms the action. The presumption is that neither abrogation nor censure has occurred.
As for Joseph, may Allah bless him and grant him peace, Allah Most High has never mentioned in the Quran that he did anything with the woman for which he repented or sought forgiveness. Everyone agrees that he did not commit the indecent act, but some people maintain that he committed