Abu Hurairah reported,

The Prophet ﷺ said, "Allah has pardoned for my community the thoughts that pass through their minds, so long as they do not act upon them or speak of them."

Bukhari 2528

Sahih

حدثنا الحميدي حدثنا سفيان حدثنا مسعر عن قتادة عن زرارة بن أوفى

عن أبي هريرة رضي الله عنه قال

قال النبي ﷺ إن الله تجاوز لي عن أمتي ما وسوست به صدورها ما لم تعمل أو تكلم

البخاري 2528صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Emancipation of slaves
Chapter
Error and forgetfulness in manumission, divorce, and similar matters, and there is no manumission except for the sake of Allah
Numbering
Darussalam 2528
Bukhari 2528