A security flaw meant many private messages were readable for years said Twitter.