Lord Justice Pitchford and Mr Justice Simon ruled the anonymity order must be discharged.
The judge said that the course used by David McGreavy's legal advisers when applying for anonymity was "wrong".
The ruling was a victory for the Justice Secretary and national newspaper publishers who all worked together last month, after the Press Association alerted them, to say that the order was legally flawed and was wrong to stop the public from knowing all the facts in the case.
Counsel Guy Vassall-Adams had told the judges that even "the nature of the victims" could not be revealed.
More top news
Dry morning with plenty of sunshine. Cloud will gradually thicken into the evening but it will remain largely dry.
It will be a fine morning with sunshine but cloud will increase with patchy light rain reaching some areas throughout the day.
Police say that he has been taken to hospital but his injuries are not thought to be life-threatening.