A lawyer says a jailhouse attack on the son of a former Real Housewives of Orange County cast member was payback. Josh Warning, son of Lauri Peterson, allegedly told deputies that he had enemies, yet they did nothing to protect him.

A video shows Josh Waring, who was in court today for a hearing related to attempted murder charges, walking towards his cell when a shirtless tattooed man attacks. The two trade blows for a couple of minutes. The video, reportedly from early last month, then shows Waring receiving medical treatment for gashes on his chest and face.

"They were supposed to be completely separated from each other. As a result, Josh suffered cuts to his face and his chest as the guy was holding a razor blade at the time of the fight," said Waring’s Lawyer, Joel Garson.

He says Waring is being mistreated in jail for exposing a scheme where law enforcement was listening in on privileged phone calls. Waring is awaiting trial for attempted murder.

"He is alleging that they violated court orders that allowed him unmonitored phone calls when he was acting as his attorney."

Garson says that waring was kept naked in cold rooms, refused medical treatment, and allowed to be around known enemies.

"Josh had warned them that he was in danger, but they did nothing to protect him."

Wearing is one of several inmates who has filed a federal lawsuit also heard in court today to change how sheriffs deputies use disciplinary isolation in seeking more access to religious services.

The O.C sheriffs department has not yet responded for request to comment.