An earlier version of this editorial incorrectly implied that legislation by Sens. Ron Wyden (D-Ore.) and Rand Paul (R-Ky.) did not include a warrant exemption for emergency cases. Their bill requires warrants in most cases. This version has been updated.

CONGRESS MANAGED to scrape together the votes to keep the government open over the holidays. But when lawmakers return to Washington in January, they will find a long to-do list: long-term funding for the Children's Health Insurance Program, which expired after September; protection for the nearly 700,000 young undocumented "dreamers" who otherwise face deportation beginning in March; support for a destabilized Affordable Care Act; and a longer-term government spending bill. What's more, the clock is ticking down toward the expiration of a crucial national security program that urgently requires congressional reauthorization.

The legislation, known as Section 702 of the Foreign Intelligence Surveillance Act, gives the National Security Agency the authority to eavesdrop on communications of non-Americans located overseas. By necessity, that includes the communications of the people they were speaking with, as well — what's known as "incidental collection," and which sometimes includes Americans. Controversially, the FBI can search that incidentally collected information without a warrant in the course of a criminal investigation.

The intelligence community argues that Section 702 is critically important to Americans' security and that letting it lapse, even for a short period, could be catastrophic. With the program about to run out on New Year's Eve, it's a relief that Congress was able to fold a short-term reauthorization into the stopgap spending bill. Section 702 now has firm congressional authorization through Jan. 19.

Because of a legal loophole, the government says it can actually keep the program running through late April, when a court order granted under the existing statute will expire. But that's no reason for Congress not to tackle reauthorization as soon as lawmakers regroup after the holidays. A program of this importance needs to be able to operate with certainty. And collection under Section 702 can't simply be switched off; the NSA will need to know well in advance of the April deadline whether it has to start shutting things down.

The short-term January authorization preserves Section 702 exactly as is. In the long term, however, Congress should reform the statute to limit the FBI's ability to conduct warrantless searches for Americans' data in Section 702-collected information. While the government emphasizes that these searches are conducted with rigorous oversight, such power still raises privacy concerns.

Sens. Ron Wyden (D-Ore.) and Rand Paul (R-Ky.), both strong privacy advocates, have introduced a bill requiring warrants in most cases. Their concerns are valid, but the potential dangers of such an approach must also be taken into account. The more prudent path would be to allow carve-outs to the warrant requirement in certain circumstances, such as in the case of intelligence investigations and a wider range of emergency situations. Bipartisan legislation proposed by the House Judiciary Committee takes this approach.

Congress can and should take the necessary time to debate the merits of various means of protecting privacy while maintaining the nation's security. In the post-Edward Snowden age, it's to everyone's benefit for the intelligence agencies to operate on the basis of clear, bipartisan authority deserving of the American people's trust — not haphazard legislation thrown together at the last minute.