A federal judge took an important step toward ending secret donations to big-spending political groups, striking down regulations that permitted some groups to hide their donors. Unfortunately, the ruling probably came too late to flush this corrupting practice from this year’s elections — though there is still time for Congress to do so.

The secret-donor problem began in 2007 when the Supreme Court, in the Wisconsin Right to Life case, ended restrictions on corporate and union political spending by advocacy groups in the weeks prior to an election. A few weeks later, the Federal Election Commission, naïvely suggesting that some corporate donors to those groups might not have intended to give for political purposes, said that only those donations explicitly earmarked for political purposes had to be disclosed. The loophole was obvious: Just don’t declare any donation to be political, and they can all be secret.

The rule does not apply to modern “super PACs,” which exist for political purposes and must disclose their donors. But it allowed groups that accept money for other purposes, like the United States Chamber of Commerce, to collect millions of undisclosed dollars to buy ads that criticize candidates who differ with their pro-business agenda.

During the 2010 Congressional elections, political operatives like Karl Rove helped set up a variety of purported charities or educational groups to provide a shield to anonymous political donors. Along with the chamber, these groups took in more than $138 million in undisclosed money that year, 80 percent of which was spent supporting Republican candidates. Many of the same secretive groups have already begun running ads in this year’s campaign, and the flood will shortly begin in earnest.