[Machine] With the Messenger of Allah ﷺ , he entered a valley, fulfilled his need, then came out and performed ablution and wiped over his socks. I said, "O Messenger of Allah, you forgot to take off your socks!" He said, "No, rather you forgot. My Lord has commanded me to wipe over them." And it has been narrated to me that the permission to wipe over the socks has been granted by Umar ibn al-Khattab, Ali ibn Abi Talib, Sa'd ibn Abi Waqqas, Abdullah ibn Mas'ud, Abdullah ibn Abbas, Hudhayfah ibn al-Yaman, Abu Ayyub al-Ansari, Abu Musa al-Ash'ari, Ammar ibn Yasir, Jabir ibn Abdullah, Amr ibn al-'As, Anas ibn Malik, Sahl ibn Sa'd, Abu Mas'ud al-Ansari, Mugheerah ibn Shu'bah, Bara' ibn Azib, Abu Sa'id al-Khudri, Jabir ibn Samurah, Abu Umamah al-Bahili, Abdullah ibn al-Harith ibn Jaz', and Abu Zaid al-Ansari. All of them agree.
مَعَ رَسُولِ اللهِ ﷺ فَدَخَلَ رَسُولُ اللهِ ﷺ وَادِيًا فَقَضَى حَاجَتَهُ ثُمَّ خَرَجَ فَتَوَضَّأَ وَمَسَحَ عَلَى خُفَّيْهِ فَقُلْتُ يَا رَسُولَ اللهِ نَسِيتَ لَمْ تَخْلَعِ الْخُفَّيْنِ قَالَ كَلَّا بَلْ أَنْتَ نَسِيتَ بِهَذَا أَمَرَنِي رَبِّي ﷻ وَرُوِّينَا جَوَازَ الْمَسْحِ عَلَى الْخُفَّيْنِ عَنْ عُمَرَ بْنِ الْخَطَّابِ وَعَلِيِّ بْنِ أَبِي طَالِبٍ وَسَعْدِ بْنِ أَبِي وَقَّاصٍ وَعَبْدِ اللهِ بْنِ مَسْعُودٍ وَعَبْدِ اللهِ بْنِ عَبَّاسٍ وَحُذَيْفَةَ بْنِ الْيَمَانِ وَأَبِي أَيُّوبَ الْأَنْصَارِيِّ وَأَبِي مُوسَى الْأَشْعَرِيِّ وَعَمَّارِ بْنِ يَاسِرٍ وَجَابِرِ بْنِ عَبْدِ اللهِ وَعَمْرِو بْنِ الْعَاصِ وَأَنَسِ بْنِ مَالِكٍ وَسَهْلِ بْنِ سَعْدٍ وَأَبِي مَسْعُودٍ الْأَنْصَارِيِّ وَالْمُغِيرَةِ بْنِ شُعْبَةَ وَالْبَرَاءِ بْنِ عَازِبٍ وَأَبِي سَعِيدٍ الْخُدْرِيِّ وَجَابِرِ بْنِ سَمُرَةَ وَأَبِي أُمَامَةَ الْبَاهِلِيِّ وَعَبْدِ اللهِ بْنِ الْحَارِثِ بْنِ جَزْءٍ وَأَبِي زَيْدٍ الْأَنْصَارِيِّ ؓ أَجْمَعِينَ