Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
tabarani:6059Isḥāq b. Ibrāhīm al-Dabarī > ʿAbd al-Razzāq > al-Thawrī > Ḥabīb b. Abū Thābit > Nāfiʿ b. Jubayr b. Muṭʿam

[Machine] That Salman al-Farsi used to seek a place to pray in, so Iljaa said to him, "Seek a pure heart and pray wherever you want." He said, "I have understood."  

الطبراني:٦٠٥٩حَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ الدَّبَرِيُّ عَنْ عَبْدِ الرَّزَّاقِ عَنِ الثَّوْرِيِّ عَنْ حَبِيبِ بْنِ أَبِي ثَابِتٍ عَنْ نَافِعِ بْنِ جُبَيْرِ بْنِ مُطْعَمٍ

أَنَّ سَلْمَانَ الْفَارِسِيَّ كَانَ يَلْتَمِسُ مَكَانًا يُصَلِّي فِيهِ فَقَالَتْ لَهُ عِلْجَةٌ الْتَمِسْ قَلْبًا طَاهِرًا وَصَلِّ حَيْثُ شِئْتَ قَالَ «فَقِهْتِ»  


See similar narrations below:

Collected by Aḥmad's Zuhd
ahmad-zuhd:816ʿAbdullāh from my father > ʿAbd al-Raḥman > Sufyān > Ḥabīb > Nāfiʿ b. Jubayr

[Machine] Salman, may Allah have mercy on him, went to the house of a Jewish or polytheistic woman seeking a place to pray. She said, "Seek a pure heart and pray wherever you wish." Salman, may Allah have mercy on him, then said, "You have understood."  

الزهد لأحمد:٨١٦حَدَّثَنَا عَبْدُ اللَّهِ حَدَّثَنِي أَبِي حَدَّثَنَا عَبْدُ الرَّحْمَنِ عَنْ سُفْيَانَ عَنْ حَبِيبٍ عَنْ نَافِعِ بْنِ جُبَيْرٍ

أَنَّ سَلْمَانَ رَحِمَهُ اللَّهُ أَتَى بَيْتَ عِلْجَةٍ أَوْ مُشْرِكَةٍ يَلْتَمِسُ مَكَانًا يُصَلِّي فِيهِ فَقَالَت ابْتَغِ قَلْبًا طَاهِرًا وَصَلِّ حَيْثُ شِئْتَ فَقَالَ سَلْمَانُ رَحِمَهُ اللَّهُ فَقِهْتَ