Have read that Apple are releasing updated firmware which will permanently disable iphones if they are unlocked or hacked. My first thought was "WTF?! Is this even legal?"

Surely its my phone and I should be able to do with it what I please? And in the UK, didn't Ofcom say that phones could not be prevented from being unlocked?