Alleged Contradictions in the Qur'an answer

Forgiveness for Slander of Chaste Women
Can slander of chaste women be forgiven? Yes [24:5], No [24:23].
Verses in question:
24:4-5. And those who launch a charge against chaste women, and produce not four witnesses (to support their allegations),- flog them with eighty stripes; and reject their evidence ever after: for such men are wicked transgressors;-Unless they repent thereafter and mend (their conduct); for Allah is Oft- Forgiving, Most Merciful.

24:23 Those who slander chaste women, indiscreet but believing, are cursed in this life and in the Hereafter: for them is a grievous Penalty.

The offence being referred to here is called Al-Qadhf, in Islamic law. It is defined simply as an unproven allegation that another individual has committed adultery or fornication. The response to this alleged contradiction is as follows:

1. The first point to note is that forgiveness is offered for any sin from which a person sincerely repents. As Allah SWT says in the Qur'an:
39:53 Say: "O my Servants who have transgressed against their souls! Despair not of the Mercy of Allah. for Allah forgives all sins: for He is Oft-Forgiving, Most Merciful.
This is a point that has been unanimously agreed upon by the scholars of Islam. Allah is mercfiul and loves to forgive, hence Allah will forgive any sin, major or minor, so long as the believer turns to Allah with sincere repentance. In Islam, sincere repentance entails the following conditions:
a) The sinner refrains from the sin
b) the sinner must feel remorse for having committed the sin
c) The sinner vows never to return to that sin, fearing Allah's punishment
In the case of sins which involve other parties, the scholars have outlined another condition. As Shaykh Abdul Aziz Ibn Baz (d.1999), the late Grand Mufti Saudi Arabia, states:
If your sin involves a right of a human being, then we must add a fourth condition: you must return to them their rights, whether it is wealth or something else; otherwise, you must seek their pardon. The Messenger of Allah (peace be upon him) said, "Whoever has wronged his brother regarding his honor or something else, let him seek his pardon today..." (Bukhari #2449) (Fatawa Islamiyah, Darussalam Publishers & Distributors, 2002, vol. 7, p.254)
Therefore, forgiveness is granted to one who commits Al-Qadhf, so long as he or she sincerely repents to Allah, which includes obtaining the forgiveness of the one against whom the allegation was made. If these conditions are met, there is no doubt that Allah will forgive such a person.

2. The point of confusion seems to arise from verse 24:23 because it mentions that those who commit Al-Qadhf are cursed (arabic: Al-Lanah) in this life and in the hereafter. However, the meaning of Allah's curse is not that such people will never be forgiven. A similar verse in the Qur'an also uses the same phrase:
33:57 Those who affront Allah and His Messenger - Allah has cursed them in this World and in the Hereafter, and has prepared for them a humiliating Punishment.
Explaining the meaning of the curse, Muhammad Asad writes in his commentary:
In classical Arabic, the term lanah is more or less synonymous with ibad (“removal into distance” or “banishment”); hence. God’s lanah denotes “His rejection of a sinner from all that is good” (Lisan al-Arab) or “exclusion from His grace” (Manar II, 50). (Asad, Message of the Qur'an, The Book Foundation 2003)
Shaykh Muhammad bin Saalih Al-Uthaymeen gives a similar explanation in response to a questioner:
[The Questioner] asked whether he was cursed by Allah during the time he committed the acts of disobedience. We say that Allah's curse could have taken place while one is committing the act of disobedience or the warranted punishment could be delayed in accordance with what Allah's will decreed for him and His wisdom. But we do know that if Allah Almighty accepts his repentance, that the curse is non-existent. This is because Allah;s curse means banishment and exclusion from His mercy, and whoever repents in within Allah's mercy. (Fatawa Islamiyah, Darussalam Publishers & Distributors, 2002, vol. 7, pp.237-238)
Therefore, there is no contradiction at all. On one hand, we have a verse that mentions sincere repentance as a means for forgiveness of Al-Qadhf, while on the other hand, we have a verse which states that those who commit Al-Qadhf are excluded from Allah's mercy if they do not repent. As Shaykh Muhammad Iqbal An-Nadvi, former Asst. Professor at the King Saud University in Riyadh, mentions:
The curse of Allah mentioned is a conditional curse, which only applies to those who do not repent. The curse is not on the one who repents with sincere repentance.
In his translation of verse 24:23, Muhammad Asad adds the phrase "without repentance" in parenthesis and provides the following comment:
According to Razi, the absence of repentance is incontrovertibly implied in the condemnation expressed in the sequence, since the Quran makes it clear in many places that God always accepts a sinner’s sincere repentance. (Asad, Message of the Qur'an, The Book Foundation 2003)
Moiz Amjad provides a similar explanation:
Keeping the above explanation in perspective, it should be clear that even though Al-Noor 24: 23 has not mentioned the exception clause, yet it is clear that even there the punishment mentioned is for such slanderers who do not repent on their past doings and do not correct their behavior. The verse, should more accurately be understood as follows:
Those who slander against chaste, innocent, believing women [and then neither repent for their slander nor correct their behavior], shall indeed be cursed in this world as well as the hereafter. For them shall be a grievous punishment.
Therefore, verse 24:23 is understood to refer to those sinners who commit Al-Qadhf and do not repent from it. It is not mentioned in the verse since it is already mentioned throughout the Qur'an, including the same Surah.

3. Before completing this discussion, it is also important to mention the position of repentance in Islamic law. The scholars have agreed that if someone commits a sin, it is better for them to repent before it is brought into the legal system, so that they may avoid the punishment. As Shaykh Muhammad Iqbal An-Nadvi mentions:
With regards to the sinner who repents, they may be pardoned if their repentance occurs before the case enters the legal procdure. After that, it must be dealt with according to the legal system.
Likewise, Shaykh Muhammad bin Saalih Al-Munajjid, a prominent Islamic scholar and author in Saudi Arabia, writes:
The offenses which the sultan (Muslim ruler) hears of are the ones for which the hudood punishments must be carried out. As for those of which he does not hear, then it is better to repent from them and to conceal oneself with the concealment of Allaah.

The reason behind this ruling is obvious. When a case is submitted to the legal system, it is no longer private. Once it becomes public, it becomes a societal issue, and the danger of the sin spreading is greater if it is not dealt with. Therefore, anyone judged under the Islamic legal system can no longer be pardoned since their sin has become public. Once they are punished for their sin, the scholars are agreed that the sinner has been expiated for the sin, and thus purified. The punishment in this life will remove their punishment that they would have experienced in the next life.
If the sinner repents during the procedure, or once the punishment is applied to him, then the repentance removes their status of being "wicked transgressors" and they are accepted into society, once again. The majority of scholars agree that such a person may have their record cleaned, and regain their right to act as a witness. However, Imaam Abu Hanifa differed on this issue as Shaykh Muhammad S. Al-Awa, a former Assoc. Professor of Law at the University of Riyadh, notes:
According to the Hanafi school, this repentance does not affect the fact that the criminal's future testimony is to be rejected. (fn. Sarakhshi, Mabsut, vol. XVI, pp. 125-129). The Shafi'i, Maliki, Hanbali, and Zaydi schools hold a contrary view, according to which the testimony of the criminal can be accepted after his repentance. (fn. Shirbini's commentary on Nawawi's Minhaj al-Talibin, vol. IV, p.403 ff.; Mawwaq, commentary on Mukhtasar Khalil, vol. VI, p. 161; Mughni, vol. X, pp. 178-181; Al-Rawad al-Nadir, vol. IV, pp. 85-87.) (El-Awa, Punishment in Islamic Law; US American Trust Publications, 1993, p. 23)
4. Some Muslims also explain the alleged contradiction by stating that the verses refer to different cases of Al-Qadhf. As Misha'al bin Abdullah writes:
The general guideline is that Allah, who excels in mercy and forgiveness, does forgive all sins with repentance, as a general rule... Even this tremendous sin [of Al-Qadhf] can be forgiven if the person sincerely repents and turns to God in penitence before death. This is the general rule. However, there is an exception to this rule and this is found in the second set of verses a little further down this same chapter.
In the second set of verses we are dealing with a completely different context and situation. This set of verses was revealed regarding a group of hypocrites lead by Abdullah ibn Ubai ibn Salool who tried to frame Aisha the wife of the prophet (pbut) and cast doubt on her integrity and chastity by alleging infidelity with a Muslim by the name of Safwan ibn Al-Muattal...This was a time of severe discord and tribulation and was not resolved until God revealed their innocence in this set of verses. The difference is that in this case the sin shall not be forgiven since it was directed at the prophet's wife in an attempt to destroy both their reputations.
And Shahid bin Waheed uses a similar explanation:
I would like to state that the verse 24:4 (which the claimant did not mention) is setting a general rule about false accusation against a chaste woman and its punishment, whereas verse 24:23 is about the exceptional rule for believing women, i.e. Muslim women. Verse 24:5 is about repentance and forgiveness.
And Shaahin Amiri-Sharifi states:
verse 24:5 is about "women" in general, even unbelievers but 24:23 talks about "believing women".
However, the agreed upon opinion is that which was already explained under points #1, #2, #3. That is the explanation which is in accordance with Islamic law.