can you get a canadian passport if you have had a drug conviction

Yes, you can get a Canadian passport with a drug conviction. There is no restriction on the issuing of passports to people with criminal records.

However, you may have trouble travelling to or entering other countries. Canada shares certain information with the other “Five Eyes” (Australia, New Zealand, the UK, the US) and you should anticipate that the United States (for example) is aware of your conviction. You will need an entry waiver to travel to the US.