Fix parsing of the hashed password
authorPhilipp Zabel <philipp.zabel@gmail.com>
Wed, 16 Feb 2011 17:06:24 +0000 (18:06 +0100)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Wed, 16 Feb 2011 17:12:34 +0000 (18:12 +0100)
src/status-area-applet-tor.vala

index 83225b2..8bb41fa 100644 (file)
@@ -223,7 +223,7 @@ class TorStatusMenuItem : HD.StatusMenuItem {
                                tor_hash_argv[2] = password;
                                string hash;
                                Process.spawn_sync ("/tmp", tor_hash_argv, null, 0, null, out hash);
-                               hash = hash.str ("16:").replace ("\n", "");
+                               hash = hash.str ("\n16:").offset (1).replace ("\n", "");
 
                                if (hash == null) {
                                        Hildon.Banner.show_information (null, null,