Custom people are allowed pretty much anything if they 'suspect' there is the chance of some dodgy stuff being transported in an item you're carrying. For instance, they are allowed to drill holes in your shoes to check and see if you're carrying dope in the heels of your shoes. They don't even need a reason to see you as a suspect, they could just be having a bad hairday. However, over here in Holland, if it turns out you are not Escobar the druglord's right hand man, they have to refund the damages caused (although this is a long and tedious thing to get organised). I can't imagine Canadian, or any other country's laws to be much different, unless you're living in some military junta banana republic.