It is narrated from Sayyiduna Mughirah bin Shu’bah (may Allah be pleased with him), he says: I saw the Messenger of Allah (peace and blessings be upon him) wiping over the backs of the leather socks.
Sayyiduna Ali bin Abu Talib (may Allah be pleased with him) says: My opinion was that wiping over the lower part of the foot had more right than wiping over the upper part, until I saw the Messenger of Allah (peace and blessings be upon him) wiping over the upper part.
Abd Khair says: I saw Sayyiduna Ali (may Allah be pleased with him) wiping over the upper part of the foot and he said: If I had not seen the Messenger of Allah (peace and blessings be upon him) wiping over the outer part of the foot, I would have thought that the underside of the foot was more deserving of being wiped.