WASHINGTON - Congress and the White House are poised for a rare agreement in the fight against terrorism with legislation that would slap new travel restrictions on foreign visitors to the United States who have recently visited Syria, Iraq, Iran, or Sudan.

Though the bill was given added urgency after the terror attack in San Bernardino, Calif., the proposed changes to the 30-year-old visa waiver program would not stop visitors such as San Bernardino shooter Tashfeen Malik, the Pakistani-born woman who entered the U.S. under a separate fiancee visa program in 2014.

Malik and her American-born husband, Syed Rizwan Farook, were responsible for the Wednesday attack that killed 14 people and injured 21.

The House legislation, hammered out in private talks between the administration and congressional leaders after the Paris terror attacks last month, would ban visa-free entry of citizens from 38 countries, including most of Europe and several U.S. allies in Asia, if they report on a travel application that they have visited any of the four targeted countries since 2011.

It would also require all 38 countries participating in the visa waiver program to share traveler information with the U.S. In the past, some countries have been slow to provide such information, U.S. officials complain, and under the bill, those countries could be kicked out of the program if they fail to comply.

A vote in the House is set for Tuesday.

"We should put in place stronger screening for those who come to America without a visa so that we can take a hard look at whether they've traveled to war zones," President Obama said Sunday in a televised address from the Oval Office. "And we're working with members of both parties in Congress to do exactly that."

Even backers of the legislation acknowledge that it will not eliminate the risk of terrorists with ties to Islamic State or other militant groups entering the U.S. to launch attacks.

"That terrorists are going to self-report is fantasy," said one congressional aide. "I would not put my faith and confidence in the self-reporting of bad guys. I would much more put it in the information sharing of our allies."

The visa-waiver bill is one of the only areas of potential agreement between Obama and Congress as Washington struggles to respond to the shifting terror threat.

While a robust bipartisan vote is expected in the House, one potential roadblock remains in the Senate: Powerful California Sen. Dianne Feinstein wants even tougher restrictions.