The simple answer is no, it is still illegal and you might be prosecuted under the Misuse of Drugs Act 1971, or the Psychoactive Substances Act. Going on-line and purchasing anything, even what you believe to be medication, can cause you some problems, apart from legal issues, you might for example get ‘fake or counterfeit drugs, this means they may come in what looks like a pharmacy dispensed package, but the contents can be either understrength or stronger, so you might get Diazepam 10 x stronger which can lead to overdose, or purchase medicines not licenced for Pharmacy or GP prescribing.
Importantly most music festivals in the UK checks have shown that these drugs can pose dangers to your health and wellbeing or if a steward searches you and, you have them on you will probably get kicked out the festival or the police might arrest you until they test the substance. Thus a lose, lose situation.
Importantly this is not recommending using the illegal drug either, as if you get caught with a Class A drug you will be dealt with by the police for possessing/supplying a Class A drug.