Allah allows a person's thoughts and whatever occurs in his heart so long as they do not become established Sahih Muslim 127 c

Arabic hadith text
وَحَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا وَكِيعٌ، حَدَّثَنَا مِسْعَرٌ، وَهِشَامٌ، ح وَحَدَّثَنِي إِسْحَاقُ بْنُ مَنْصُورٍ، أَخْبَرَنَا الْحُسَيْنُ بْنُ عَلِيٍّ، عَنْ زَائِدَةَ، عَنْ شَيْبَانَ، جَمِيعًا عَنْ قَتَادَةَ، بِهَذَا الإِسْنَادِ مِثْلَهُ
Translation

The same hadith has been narrated by Zuhair b. Harb, Waki, Ishaq b. Mansur, Husain b. 'Ali.