The Prophet ﷺ said, "If only one day were left of time, Allah would raise up a man from my household who would fill it with justice as it had been filled with tyranny."
عن النبي ﷺ قال: لو لم يبق من الدهر إلا يوم لبعث الله رجلا من أهل بيتي يملؤها عدلا كما ملئت جورا.
It was narrated by Abu Dawud (4283) and Ahmad (773), both from the hadith of Abu Naeem Fadl bin Dukayn, who said, Fitr narrated to us, from Qasim bin Abu Bazza, from Abu Tufayl, from Ali, and he mentioned it. The wording given is that of Abu Dawud. Its chain of transmission is hasan because of Fitr, that is, Fitr bin Khalifa, for he is hasan al-hadith.There also came a narration from him with a daif chain, "The Mahdi is from us, the people of the household, Allah will set him right in a single night." It was narrated by Ibn Majah (4085), Ahmad (645), Bukhari in Tarikh al-Kabir (1/317), and Aqeeli in his biography of Yasin Ajli in his book on weak narrators, through various routes from Yasin Ajli, from Ibrahim bin Muhammad bin Hanafiya, from his father, from Ali, and he mentioned it.Aqeeli reported with a chain going back to Bukhari that he said, "Yasin bin Sayyar Ajli, from Kufa, there is something questionable in his hadith." Then Aqeeli mentioned this hadith and said, "Yasin is not corroborated in this wording, and there are hadiths about the Mahdi with sound chains through other routes besides this one."I say, Yasin Ajli is corroborated by Salim bin Abu Hafsa, from Ibrahim bin Muhammad bin Hanafiya, whose hadith was extracted by Abu Naeem in Akhbar Isbahan (1/170). The chain revolves around Ibrahim bin Muhammad bin Hanafiya, who is Ibrahim bin Muhammad bin Ali bin Abu Talib Hashimi. No one deemed him reliable except Ajli and Ibn Hibban. Bukhari gave him a biographical entry in Tarikh al-Kabir (1/317) and mentioned this hadith for him, saying, "There is something questionable in its chain of transmission."As for the phrase "Allah will set him right in a single night," it has not come in any well-known sahih hadiths.