One way or another, this is long overdue. Regardless of what you think the rules should be and in my case I think this legislation probably doesn't go far enough the fact is that we ought to have some rules. Right now all we have are Department of Justice "guidelines" for when reporters can and can't be compelled to testify about their sources, and I just don't like relying on DOJ guidelines. They're too easy to change and too easy to abuse.
But even if this bill isn't ideal, it's a start. 49 states have shield laws and they work well. We should have one at the federal level too. At least then everyone knows what the ground rules are.
And just to forestall the usual complaint: Yes, I know that journalists sometimes abuse anonymous sources. That's life. But think of the big picture: overall, protecting the right of reporters to dig into government corruption without fear of going to jail is far more important to the cause of liberalism than the fact that occasionally this protects sources we'd like to see revealed. The executive branch already has plenty of tools for protecting its secrets. It doesn't need more.