The Prophet ﷺ said, "Now then, Ayesha, such and such has reached me about you. If you are innocent, Allah will declare your innocence, and if you have fallen into a sin, then seek Allah's forgiveness and turn to Him in repentance, for when a servant confesses a sin and then repents, Allah accepts his repentance."
في قصة الإفك:
قال النبي ﷺ: أما بعد يا عائشة، فإنه قد بلغني عنك كذا وكذا، فإن كنت بريئة، فسيبرئك الله وإن كنت ألممت بذنب فاستغفري الله وتوبي إليه، فإن العبد إذا اعترف بذنب، ثم تاب تاب الله عليه.
Bukhari related it in the Book of Military Expeditions (4141), and Muslim in the Book of Repentance (2770), both through Zuhri, who said, "Saeed bin Musayab, Urwa bin Zubayr, Alqama bin Waqqas, and Ubaydullah bin Abdullah bin Utba bin Masud told me, on the authority of Ayesha, wife of the Prophet ﷺ, regarding what the people of the slander said about her, and each of them related to me a portion of her account." He then narrated a lengthy hadith, within which is the part mentioned.