I've done some quick searching and it seems that the 2010 Equality Act makes it "grants employees the right to discuss salary for collective bargaining or protection", and that makes it illegal for employers to prohibit you from discussing your salary. Here is the best summary I've found. No idea how this make the original thing I quoted legal!
It's illegal in the US, but I guess not in the UK.
I've done some quick searching and it seems that the 2010 Equality Act makes it "grants employees the right to discuss salary for collective bargaining or protection", and that makes it illegal for employers to prohibit you from discussing your salary. Here is the best summary I've found. No idea how this make the original thing I quoted legal!