A judge has ruled that Massachusett’s sexual offender law does not permit the state to post photos and other identifying information on the Internet.