Don't keep the password around after we've used it.
authorChris Jones <chris@cjones.org>
Sun, 29 Sep 2013 21:33:03 -0600
changeset 157 eadf15a06ff5
parent 156 520ccb3e05d4
child 158 2d948fcbb5d7
Don't keep the password around after we've used it.
TODO.txt
xmpp/xmpp.go
--- a/TODO.txt	Sat Sep 28 13:15:32 2013 -0600
+++ b/TODO.txt	Sun Sep 29 21:33:03 2013 -0600
@@ -5,8 +5,6 @@
 
 Eliminate as many uses of Generic as possible.
 
-Don't keep the password in memory once we're done with it.
-
 Rename extension.StanzaHandlers to something like StanzaTypes.
 
 Think about how to gracefully shutdown. Probably have a Close()
--- a/xmpp/xmpp.go	Sat Sep 28 13:15:32 2013 -0600
+++ b/xmpp/xmpp.go	Sun Sep 29 21:33:03 2013 -0600
@@ -221,6 +221,9 @@
 		return nil, err
 	}
 
+	// Forget about the password, for paranoia's sake.
+	cl.password = ""
+
 	// Initialize the session.
 	id := NextId()
 	iq := &Iq{Header: Header{To: cl.Jid.Domain, Id: id, Type: "set",