A federal judge blocked a New York City law intended to curb Airbnb Inc., giving a boost to the company and others that offer short-term rentals in the city.

The law, which passed last year and was slated to take effect in February, was intended to rein in what authorities have said are thousands of illegal short-term rentals that contribute to a housing shortage.

The new regulation required hosting sites like Airbnb to provide city enforcement officers with a monthly report listing precise details on every short-term rental in New York City. The first reports were due in March.

GERMAN IT SECURITY CHIEF FACES GRILLING OVER HACKING CASE

But on Thursday, Judge Paul A. Engelmayer, of federal district court in Manhattan, found that the city’s new rules violated constitutional protections against illegal searches.

He said the law was overly broad, essentially requiring Airbnb and other companies to hand over most of the data in their computer systems. In addition, Judge Engelmayer said the law didn’t provide a framework for listing companies or hosts to challenge the data requests. His decision imposed a preliminary injunction against the new rule, pending further fact-finding.

The judge’s ruling is at least a temporary victory for Airbnb and other home-sharing companies, which have criticized the law as trampling on the rights of hosts and alleged it was an effort to protect the hotel industry.

DELETE FACEBOOK, 5G SPEEDS AND MORE: TECH Q&A

“The decision today is a huge win for Airbnb and its users, including the thousands of New Yorkers at risk of illegal surveillance who use Airbnb to help make ends meet,” a spokeswoman for Airbnb said.

Airbnb is planning an initial public offering and has committed to being ready for it by July 1, 2019.

Click here to read more at The Wall Street Journal, where this story was originally published.