Answer:
The narration is as follows: Ali (may Allah be pleased with him) narrates that the Messenger of Allah ﷺ said:
لا تبرز فخذك ولا تنظرت إلى فخذ حي ولا ميت
“Do not uncover your thigh, and do not look at the thigh of anyone, living or dead.”
Comment:
The chain of narration is extremely da’if (weak).
➊ Ibn Jurayj (may Allah have mercy on him) is a mudallis (one who practises tadlis), and he did not hear from Habib bin Abi Thabit.
➋ Habib bin Abi Thabit is a mudallis, and he did not hear from Asim bin Damra. Between them there is an intermediary, Amr bin Khalid al-Wasiti, and Amr is accused of lying and is matruk (abandoned).
Imam Abu Dawud (may Allah have mercy on him) (4015) says:
هذا الحديث فيه نكارة
“This is a munkar (rejected, weak) hadith.”