A serious effort to do just that finally got some traction when former governor Charlie Baker made the banning of revenge porn one pledge in his State of the Commonwealth address. Soon after, the brave survivors came and told their stories. People like Sandy, who had to deal with the emotional turmoil of seeing her nude images on Facebook, the work of an ex-boyfriend. The House moved relatively quickly to pass the measure, the Senate dallied, and the clock ran on — for another year.

Get Today in Opinion

Globe Opinion’s must-reads, delivered to you every Sunday-Friday.

Last week, less than a month after yet another public hearing, the Judiciary Committee took the best ideas from at least nine bills filed by members of the House and Senate to put the issues of punishing revenge porn and dealing with juvenile “sexting” back on the table.

The new bill makes it a crime to knowingly distribute “visual material depicting another person, either identifiable or identified by the distributing person, who is nude, partially nude, or engaged in sexual conduct, when the distribution causes physical or economic injury to the person depicted.” The crime of criminal harassment is punishable by as much as 2½ years in prison, a fine of up to $10,000, or both.

A second or subsequent offense ups the prison term to as much as 10 years and the fine to $15,000. And the legislation makes clear that the original consent “to the creation of visual material shall not constitute consent to the distribution” of that photo.

While Massachusetts law prohibits surreptitiously photographing, videotaping, or surveilling a person and disseminating that content, it has never addressed instances where a victim may have initially consented to a nude photo — just not to its sharing on the internet.

A 2005 Supreme Judicial Court ruling, advocates contend, made it difficult to pursue criminal charges unless they involved multiple violations.

Courts have pointed out that it falls to the Legislature to address the problem. In 2019, the Massachusetts Appeals Court noted, “The Legislature may wish to consider adopting legislation prohibiting the nonconsensual dissemination of pornography, sometimes described as ‘revenge porn.’ ”

This legislation, now in the hands of the House Ways and Means Committee, also tackles the thorny issue of teen sexting — attempting to strike a balance between writing off offenses that can cause real harm to victims and yet not ruining forever the lives of youthful offenders prone to engage in, well, high-risk and often just plain dumb stuff.

Sexting offenses could indeed be punished by a commitment to the Department of Youth Services, but such convictions in Juvenile Court would not carry a lifetime obligation to register as a sex offender. And the state’s attorney general, district attorneys, DYS, and the Department of Elementary and Secondary Education would also be mandated to develop and implement an “educational diversion program.”

The bill also wisely exempts from the definition of “dissemination” any efforts made by a juvenile to report an incident of sexting to a parent, law enforcement, or school personnel — an effort to keep open those valuable lines of communication.

Lawmakers have been on notice at least since that 2019 case that the state has a problem protecting the potential victims of revenge porn. Even as state after state moved to update its laws to cover a crime that a generation ago was an unlikely technological possibility, Massachusetts has remained behind the legal curve. Victims deserve better.