Unpaid interns in NYC get a few rights. Up next: a salary?

New York Mayor Bill de Blasio holds a press conference in March in Queens.

FORTUNE — How much is justice worth? Unpaid interns planning to work in New York City this summer may want to crunch the numbers. They won’t get a paycheck, but at least they now have the right to sue.

On Tuesday, Mayor Bill de Blasio signed into law a measure that will allow unpaid interns to file lawsuits against an employer for harassment and discrimination.

Bill sponsor James Vacca, a city councilman from the Bronx, said that the law aims to put unpaid interns on equal footing with a company’s paid employees. Manhattan Borough President Gale Brewer, who introduced the bill as a councilwoman, said that it’s “outrageous” that an intern in the private sector would not have this protection.

The fact that unpaid interns in NYC previously lacked the right to legal recourse for discrimination came to light in January, when a New York federal district court judge ruled that an intern at Phoenix Satellite Television U.S. was not allowed to sue the broadcaster because she was not paid and therefore not technically an employee.

MORE: How coffee can keep workers honest

The intern, Lihuan Wang, filed a lawsuit accusing the station’s Washington, D.C. bureau chief of sexually harassing her after he lured her into his hotel room under the pretext that he wanted to discuss the possibility of a full-time job.

The law that de Blasio signed on Tuesday is good news for unpaid interns in NYC, but it doesn’t help unpaid interns elsewhere. Only Washington, D.C., and the state of Oregon have similar statutes that protect such workers from sexual harassment and discrimination.

Everywhere else, unpaid interns go without workplace protections. The prevailing law that the New York district court judge cited in the Wang ruling is based on a 1997 decision by the Second Circuit Court of Appeals. That court found that a student social work intern who claimed that she was sexually harassed by a staff psychiatrist during her internship couldn’t sue under Title VII of the federal Civil Rights Act because she wasn’t an employee based on the law’s reasoning that compensation “is an essential condition to the existence of an employer-employee relationship.”

The Equal Employment Opportunity Commission, which enforces the country’s employment discrimination laws, also follows this position. The agency has said that the Civil Rights Act doesn’t cover interns unless they receive “significant remuneration.”

MORE: Why Google and Facebook are drooling over drone companies

A bill to protect unpaid interns is in committee in California, but there has been “no real effort” to address this issue on a nationwide scale, says Ross Eisenbrey, vice president of the Economic Policy Institute. “There haven’t been that many cases, so the issue hasn’t been brought to the attention of legislatures. Once people think about it they’re going to say to themselves, ‘This is a loophole of stupidity in the law that we would say if you’re paid you can’t be harassed, if you’re not paid, you can be.”

Subscribe to Well Adjusted, our newsletter full of simple strategies to work smarter and live better, from the Fortune Well team. Sign up today.