WASHINGTON -- With Sen. Bernie Sanders (I-Vt.) showing renewed strength in both Iowa and New Hampshire, Democratic presidential front-runner Hillary Clinton has spent much of January attempting to make inroads with progressive voters enamored with her rival's Wall Street policies. Sure, Sanders talks tough on big banks, Clinton and her allies have alleged, but he's soft on "shadow banking" -- a complex, risky sector of the economy.

Like the Clinton campaign's recent broadside against Sanders' Medicare-for-all health care plan, the attack is misleading and dishonest. It also sidesteps her complicated record on shadow banking as a senator, which includes a vote in favor of a bill that eventually fueled shadow banking in the mortgage market and exacerbated the financial crisis. Clinton's team, moreover, continues to criticize legislation supported by both Sanders and Sen. Elizabeth Warren (D-Mass.) that would ameliorate the problems created by that bill.

The saga surrounding that vote mirrors Clinton's mixed record on financial reform issues. In the waning years of Bill Clinton's presidency, then-first lady Hillary Clinton arranged a meeting with then-Harvard University Law School professor Elizabeth Warren. Warren quickly convinced Clinton to oppose a nasty bankruptcy bill then brewing Congress, which would have helped credit card companies at the expense of families in financial distress. The White House, which had been leaning toward supporting the bill, quickly reversed course, and vetoed it.

But after joining the Senate in 2001, Clinton voted for a very similar bill, which became law after a few other tweaks in 2005. Clinton sat out the 2005 vote, and has said she would have opposed it.

The law's effect on consumers are well documented. Bankruptcy is a court-supervised financial do-over. If you accept having your credit score ruined and being denied access to credit cards and other consumer loans for several years, a judge can slash your credit card balances and other debts. Warren's research had shown that most people file for bankruptcy because they have been through a divorce, lost a job, or been hit with heavy medical bills -- not because they purchased too many gold-plated TVs with a credit card. Making it harder to file for bankruptcy was simply helping banks kick people while they were down. It proved especially painful during the Great Recession.

But other important aspects of the bill had nothing to do with consumers. They focused on corporate lending, and allowed those pushing various shadow banking products the opportunity to skirt key rules. In particular, they made it easier to provide funding to subprime mortgage houses packing together securities that they intended to sell to other investors.

Back when people bundled mortgage-backed securities, they needed money to get pools of mortgages together. And they typically relied on some fairly traditional bank loans to get the money to assemble their mortgages -- loans which they paid off once they sold their mortgage securities to investors. But things changed after the 2005 bill. By swapping a few words in the contract, lenders of all stripes could immunize themselves from losses they might incur if and when their subprime mortgage clients went broke and filed for bankruptcy. All they had to do was call their loans "repurchase agreements."

That was a pretty good trick when the subprime market cratered, and everybody started wondering if subprime specialists would survive. The subprime firms could continue getting cash, however, because their lenders didn't have to worry about getting paid if the subprime firm went under.

"It was just pouring more fuel on the fire," said Adam Levitin, a Georgetown University Law School professor .

While other contracts of a bankrupt firm would have to take whatever losses a bankruptcy judge imposed on them, any loan classified as a "repurchase agreement" would be able to collect its collateral immediately, without taking a haircut.

The Clinton campaign didn't respond to a request for comment on this article.

Pro-Wall Street votes were the bipartisan norm in Congress from the Reagan era until the crash of 2008. Clinton herself didn't vote for the 2005 bill that ultimately became law. She has said she was visiting her husband in the hospital several months after his heart surgery. Bill Clinton was receiving additional surgical attention to clean up aspects of the initial procedure. Hillary Clinton has defended her vote for the 2001 bill, which included similar language, by saying she had cut a deal to ensure that alimony and child support payments would not be threatened by it. She has also said she regrets her 2001 vote, and that she would have opposed the 2005 bill.

Although Sanders has been a consistent champion of Wall Street reform in Congress, his voting record includes a notable blemish -- support for the bill that deregulated derivatives, the complex financial contracts at the heart of the 2008 collapse. (Sanders has successfully worked to repeal part of that law, and supports repealing the remainder.)

Today, Clinton supports imposing new fees and collateral for repurchase agreements in general. But she continues to oppose Warren's bill to end the bankruptcy code privileges that mortgage repurchase deals receive. The American Bankruptcy Institute issued a report in 2014 calling for an end such treatment, and Warren -- who has praised the bank reform platforms of both Clinton and Sanders -- included the recommendation in her bill to reinstate a modern version of Glass-Steagall, the Depression-era law that banned banks from engaging in risky securities operations.

That bill is a key part of Sanders' financial reform platform. Clinton surrogates have repeatedly ridiculed it in recent weeks, saying her shadow banking platform is superior. But her record on shadow banking is, well, shadowy.

Zach Carter is a co-host of the HuffPost Politics podcast "So That Happened." Subscribe here, or listen to the latest episode below:

This article has been updated to provide additional detail about Bill Clinton's surgical procedure.

Also on HuffPost:

PHOTO GALLERY Hillary Clinton's Celebrity Donors