A new law on substance use disorder includes provisions that legally protect those who test drugs for harm reduction purposes.