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:2150Aḥmad b. al-Muʿallá al-Dimashqī > Hishām b. ʿAmmār > al-Walīd b. Muslim > al-Awzāʿī

[Machine] I heard Al-Awza'i say, "Exposing the thigh in the mosque is considered inappropriate, but it is not considered inappropriate in the bathroom."  

الطبراني:٢١٥٠حَدَّثَنَا أَحْمَدُ بْنُ الْمُعَلَّى الدِّمَشْقِيُّ ثنا هِشَامُ بْنُ عَمَّارٍ ثنا الْوَلِيدُ بْنُ مُسْلِمٍ قَالَ

سَمِعْتُ الْأَوْزَاعِيَّ يَقُولُ «الْفَخِذُ فِي الْمَسْجِدِ عَوْرَةٌ وَفِي الْحَمَّامِ لَيْسَتْ بِعَوْرَةٍ»