I'm just watching the series for the first time (half way through S7) and just saw all the shuttle stuff today, this is what I think:
Firstly the whole military shuttle business is really silly. Not only is it far-fetched (as one poster above stated, rather Tom Clancy-ish) but the actual facts, in respect to the rescue mission and the military shuttle itself, are not given enough air time to warrant the whole 'Toby did it' fiasco and its air time.
Although on one hand it can be seen as good writing because even today, many years after it aired, we're still talking about who the leak was, on the other no real perpetrator is made even slightly clear. I think its a serious plot gap.
IMHO I fully believe Toby didn't do the leak on his own. Its just not possible given the amount dedication he had to the administration and Bartlet himself (also given the way he reacted to a leak by another staffer in a previous episode). Schiff (the actor who plays Toby) even said as such: "Toby would never in 10 million years have betrayed the president in that fashion. Even if he had, there would have been seven episodes' worth of fights before he did it." He justified the story to himself by reasoning that Toby was covering for somebody else.
But then what really happened...
Was he covering for CJ? I don't believe so. My reasoning for this is in the scene where he confesses to her. I think if he was covering for her she would not have been as harsh in her body language as she was, especially considering they were in the room alone. She looked genuinely angry/disappointed.
Was it thought out between Toby and Bartlet, this too I do not fully think was the case (but I'm swaying). I don't believe that Bartlet would have let himself permit Toby to take the blame for something that he had a part in.
Although I can see how the double-team conspiracy would work, but for it to fit in with what was shown it would need just a tad more hinting from the characters.
***
From another forum on the topic to add to the discussion:
From the moment I first saw S07E05 "Here Today" I immediately assumed that Bartlett was the source of the leak. Toby 'fell on his sword' for his President. Babbish's facial gestures when he and Toby are waiting outside the Oval Office immediately after Bartlett fires Toby were my first clue. A guard enters: "Mr. Ziegler. I'll need your hard pass, sir." Toby and the guard exit and Babbish looks on THEN the camera cuts to a close-up of Babbish with a look on his face that suggests he's not quite buying what has just happened.
Then I watched the previous episode again S07E04 "Mr Frost" and there's a telling scene in The Oval Office between Bartlett and Toby apparently to discuss the President's speech at Chairman Farad's upcoming funeral.
BARTLET: Farad didn't think the peace would work. I pushed him into doing it. [pause] Leo called. He's coming to town to do the Sunday morning shows. He's also coming to see his attorney. It seems he's been served a subpoena to testify.
TOBY: Leo can't pull up to the Hart building in a limo. The Vice Presidential candidate can't testify. It'll be the end of the Santos campaign.
BARTLET: The investigation into the leak is focused on C.J.
TOBY: They've got it wrong.
BARTLET: Apparently, they don't see it that way.
For me this is their 'coded' exchange telling each other that their initial plan to leak the story and attempt to 'minimize casualties' has failed and 'Plan B' is now in effect. Toby and Bartlett were both prepared to hinder the investigation and probably finally take the blame - but wrecking the Santos campaign would be too high a price to pay.
I believe the 'wrestling with his conscience' that occurs in the final episode (S07E22 "Tomorrow") is NOT Bartlett debating whether or not to pardon Toby but whether he himself shouldn't march down to the Attorney General's office and confess his role in the conspiracy.
***
(Also as a side note I was really disappointed with the whole go nowhere Donna-Josh/Zoe-Charlie business. I think that after Sorkin left the team that was there didn't get back in the groove until about half way through S6, S5 was a complete write off. Also the Josh-Leo/Leo-Barlet conflicts were rubbish and the S6 staff turnover was a joke. That said I loved the campaigns though, really well done in my view, though whether they chose the right actor to play Santos, I'm not too sure).