Qur'an Contradiction:

Can Slander be forgiven?

Those who slander chaste women are cursed forever [in this life and the Hereafter] according to Sura 24:23.

But Sura 24:5 says that they can be forgiven if they repent after they have been beaten with 80 stripes. since it says to let them come back into full rights as members of society, restoring their right to testify, BECAUSE Allah is (also) oft-forgiving, most Merciful.

The earthly forgiveness would not have any foundation or counterpart if Allah would not extend forgiveness as well. That is the very basis on which He commands earthly forgiveness.

A Muslim's Response by Shaahin Amiri-Sharifi
Date: Sun Nov 24 00:17 EST 1996

this is to answer:
--Can slander of chaste women be forgiven? 

--verse 24:5 is about "women" in general, even unbelievers
  but 24:23 talks about "believing women". 
  the punishment in case that the acuser doesn't provide 4 
  witnesses is 80 stripes and losing the credibility as a 
  witness in the society, unless they repent and DO GOOD after
  that, to make it clear that they have repented honestly and 
  this punishment goes for both cases. but the one who acuses
  "believing women", is cursed forever too. in the later case,
  no extra "earthly" punishment is considered.
  allah is the most forgiving! he may even forgive the people
  in the second category. this forgiveness is not contradictory
  to the fact that they are cursed forever. 
  to make it clearer, suppose that you being "retaliated" by
  a person who suffers from a crime you committed against him.
  after, say cutting your hand off(!), he may forgive you, but
  the "curse" of losing hand is yours and with you forever.
  point is, being "cursed" doesn't mean being "unforgiven".


Contradictions in the Qur'an
Answering Islam Home Page