Days after a contentious public hearing with state senators, Treasurer Curtis Loftis nearly put South Carolina’s entire financial system at risk of a cyberattack by saying he was going to post reams of account data online, according to a report released Tuesday.