Abu Musabbih al-Himsi (may Allah have mercy on him) said: I sat with a group of the Companions of the Messenger of Allah (peace and blessings be upon him), among whom were Sayyiduna Shaddad bin Aws and Sayyiduna Thawban, the freed slave of the Messenger of Allah (peace and blessings be upon him) (may Allah be pleased with them both), and they were reminding one another. They said: The Messenger of Allah (peace and blessings be upon him) said: "A man does such-and-such good deeds, and yet he is a hypocrite." The Companions said: O Messenger of Allah, how can he be a hypocrite when he believes in you? He (peace and blessings be upon him) said: "He curses the rulers and reviles them."
Hadith Referenceالمعجم الكبير للطبراني / باب الشين / 7128