Abu Huraira reported Allah's Messenger ( صلی اللہ علیہ وسلم ) as saying:
O people, Allah is Good and He therefore, accepts only that which is good. And Allah commanded the believers as He commanded the Messengers by saying: O Messengers, eat of the good things, and do good deeds; verily I am aware of what you do (xxiii. 51). And He said: O those who believe, eat of the good things that We gave you (ii. 172). He then made a mention of a person who travels widely, his hair disheveled and covered with dust. He lifts his hand towards the sky (and thus makes the supplication): O Lord, O Lord, whereas his diet is unlawful, his drink is unlawful, and his clothes are unlawful and his nourishment is unlawful. How can then his supplication be accepted?