Bob Woodward and Carl Bernstein defended the press while discussing recent charges that the White House leaked classified national security information to the New York Times.

The White House is facing allegations that it deliberately leaked information to the paper to play up President Obama's record on national security. John McCain and several other legislators are demanding an investigation into the leaks, while the administration has vehemently denied the charges.

Woodward and Bernstein appeared on Sunday's "Face the Nation" to mark the 40th anniversary of Watergate, and weighed in on the controversy.

When asked what he made of the allegations, Bernstein cautioned against "creating a witch hunt" for sources and reporters. "Because now more than ever we need real reporting on this presidency, on national security, on all these areas," he said. "And the press is not the problem here." He added that there were laws in place to handle people who were leaking classified information.

Woodward agreed, asking, "was there real harm to the national security?" He continued, "And it’s very difficult, I know from doing stories like this, where you are dealing with sensitive government secrets, to modulate and be careful, at the same time hold the government accountable for what they’re doing."

"The record of the press, you know, is really quite good in protecting real genuine national security secrets which we often know about," Bernstein added.

For its part, the Times has defended its reporting. Managing editor Dean Baquet said he "would more easily understand the criticism if we did not examine Obama's role in drone strikes than the criticism that we did."

Related on HuffPost:

Loading Slideshow...
  • US President Barack Obama pauses while a

    US President Barack Obama pauses while answering questions after a statement in the Press Briefing Room of the White House on June 8, 2012 in Washington, DC. Obama said Friday that Europe's leaders 'understand the urgent need to act' to solve the eurozone crisis, as a rescue plan for Spain's banks appeared in the works. But he also warned Greeks that they would face more hardship if they choose to leave the eurozone after elections take place on June 17. AFP PHOTO/BRENDAN SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/GettyImages)

  • US President Barack Obama speaks about t

    US President Barack Obama speaks about the economy on June 8, 2012, at the White House in Washington, DC. Obama said Friday that Europe's leaders 'understand the urgent need to act' to solve the eurozone crisis, as a rescue plan for Spain's banks appeared in the works. But he also warned Greeks that they would face more hardship if they choose to leave the eurozone after elections take place on June 17. AFP PHOTO/BRENDAN SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/GettyImages)

  • US President Barack Obama speaks about t

    US President Barack Obama speaks about the economy on June 8, 2012, at the White House in Washington, DC. Obama said Friday that Europe's leaders 'understand the urgent need to act' to solve the eurozone crisis, as a rescue plan for Spain's banks appeared in the works. But he also warned Greeks that they would face more hardship if they choose to leave the eurozone after elections take place on June 17. AFP PHOTO/BRENDAN SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/GettyImages)

  • Dianne Feinstein, Saxby Chambliss, Mike Rogers, C.A. "Dutch" Ruppersberger

    After a closed-door meeting with National Intelligence Director James Clapper, the four leaders of the House and Senate Intelligence Committees hold a news conference, on Capitol Hill in Washington, Thursday, June 7, 2012, to discuss the recent spate of classified national security information leaks. From left are Rep. C.A. "Dutch" Ruppersberger, D-Md., the ranking Democrat on the House Intelligence Committee; House Intelligence Committee Chairman Mike Rogers, R-Mich., Sen. Saxby Chambliss, R-Ga., vice-chair of the Senate Intelligence Committee, and Senate Intelligence Committee Chair Sen. Dianne Feinstein, D-Calif. (AP Photo/J. Scott Applewhite)

  • Dianne Feinstein, Saxby Chambliss, Mike Rogers, C.A. "Dutch" Ruppersberger

    After a closed-door meeting with National Intelligence Director James Clapper, the four leaders of the House and Senate Intelligence Committees hold a news conference, on Capitol Hill in Washington, Thursday, June 7, 2012, to discuss the recent spate of classified national security information leaks. From left are, Rep. C.A. "Dutch" Ruppersberger, D-Md., the ranking Democrat on the House Intelligence Committee; House Intelligence Committee Chairman Rep. Mike Rogers, R-Mich., Senate Intelligence Committee Chair Sen. Dianne Feinstein, D-Calif.; and Sen. Saxby Chambliss, R-Ga., vice-chair of the Senate Intelligence Committee. (AP Photo/J. Scott Applewhite)

  • Dianne Feinstein, Saxby Chambliss, Mike Rogers, C.A. "Dutch" Ruppersberger

    After a closed-door meeting with National Intelligence Director James Clapper, the four leaders of the House and Senate Intelligence Committees hold a news conference, on Capitol Hill in Washington, Thursday, June 7, 2012, to discuss the recent spate of classified national security information leaks. From left are, Rep. C.A. "Dutch" Ruppersberger, D-Md., the ranking Democrat on the House Intelligence Committee; House Intelligence Committee Chairman Rep. Mike Rogers, R-Mich., Senate Intelligence Committee Chair Sen. Dianne Feinstein, D-Calif.; and Sen. Saxby Chambliss, R-Ga., vice-chair of the Senate Intelligence Committee. (AP Photo/J. Scott Applewhite)

  • James Clapper

    Director of National Intelligence James Clapper, center, emerges from a closed-door meeting with the House and Senate Intelligence Committees aimed at stopping security leaks, Thursday, June 7, 2012, on Capitol Hill in Washington. (AP Photo/J. Scott Applewhite)

  • James Clapper

    Director of National Intelligence James Clapper, center, emerges from a closed-door meeting with the House and Senate Intelligence Committees aimed at stopping security leaks, Thursday, June 7, 2012, on Capitol Hill in Washington. (AP Photo/J. Scott Applewhite)

  • Intelligence Cmte Members Discuss Leaks Of Classified Nat'l Security Information

    WASHINGTON, DC - JUNE 07: U.S. Sen. John McCain (R-AZ) is questione by reporters after he left a closed door joint Senate and House Intelligence Committee meeting on Capitol Hill, on June 7, 2012 in Wasington, DC. The joint Intelligence committee met with James R. Clapper,ÊDirector of National Intelligence to discuss administration leaks of classified information. (Photo by Mark Wilson/Getty Images)

  • Jay Carney

    Press Secretary Jay Carney briefs reporters at the White House in Washington, Monday, June 4, 2012. (AP Photo/Charles Dharapak)

  • US President Barack Obama speaks to the

    US President Barack Obama speaks to the media on June 8, 2012 at the White House in Washington,DC. Obama addressed the eurozone crisis and its impact on the United States while urging Congress to pass a string of bills designed to help grow the economy and create more jobs. AFP PHOTO/BRENDAN SMIALIOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/GettyImages)

  • US President Barack Obama speaks to the

    US President Barack Obama speaks to the media on June 8, 2012 at the White House in Washington,DC. Obama addressed the eurozone crisis and its impact on the United States while urging Congress to pass a string of bills designed to help grow the economy and create more jobs. AFP PHOTO/BRENDAN SMIALIOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/GettyImages)

  • House Leader Boehner And Cantor Respond To Obama's Economic News Conference

    WASHINGTON, DC - JUNE 08: House Majority Leader Eric Cantor (R-VA) (L) and U.S. Speaker of the House John Boehner (R-OH) (R) respond to U.S. President Barack Obama's remarks on the U.S. economy June 8, 2012 in Washington, DC. During their remarks, Cantor said, 'Did he see the job numbers that came out last week? The private sector is not doing fine. And, frankly, I'd ask the president to stop engaging in the blame game.' (Photo by Win McNamee/Getty Images)

  • House Leader Boehner And Cantor Respond To Obama's Economic News Conference

    WASHINGTON, DC - JUNE 08: House Majority Leader Eric Cantor (R-VA) (L) and U.S. Speaker of the House John Boehner (R-OH) (R) respond to U.S. President Barack Obama's remarks on the U.S. economy June 8, 2012 in Washington, DC. During their remarks, Cantor said, 'Did he see the job numbers that came out last week? The private sector is not doing fine. And, frankly, I'd ask the president to stop engaging in the blame game.' (Photo by Win McNamee/Getty Images)

  • House Leader Boehner And Cantor Respond To Obama's Economic News Conference

    WASHINGTON, DC - JUNE 08: U.S. Speaker of the House John Boehner (R-OH) arrives to respond to U.S. President Barack Obama's remarks on the U.S. economy June 8, 2012 in Washington, DC. During remarks with House Majority Leader Eric Cantor, Cantor said, 'Did he see the job numbers that came out last week? The private sector is not doing fine. And, frankly, I'd ask the president to stop engaging in the blame game.' (Photo by Win McNamee/Getty Images)

  • House Leader Boehner And Cantor Respond To Obama's Economic News Conference

    WASHINGTON, DC - JUNE 08: House Majority Leader Eric Cantor (R-VA) (L) and U.S. Speaker of the House John Boehner (R-OH) (R) respond to U.S. President Barack Obama's remarks on the U.S. economy June 8, 2012 in Washington, DC. During their remarks, Cantor said, 'Did he see the job numbers that came out last week? The private sector is not doing fine. And, frankly, I'd ask the president to stop engaging in the blame game.' (Photo by Win McNamee/Getty Images)

  • House Leader Boehner And Cantor Respond To Obama's Economic News Conference

    WASHINGTON, DC - JUNE 08: U.S. Speaker of the House John Boehner (R-OH) (R) and House Majoirty Leader Eric Cantor (R-VA) (L) respond to U.S. President Barack Obama's remarks on the U.S. economy June 8, 2012 in Washington, DC. During Cantor's remarks, Cantor said, 'Did he see the job numbers that came out last week? The private sector is not doing fine. And, frankly, I'd ask the president to stop engaging in the blame game.' (Photo by Win McNamee/Getty Images)