{"action":"closed","issue":{"url":"https://api.github.com/repos/gordonwritescode/gitty/issues/35","labels_url":"https://api.github.com/repos/gordonwritescode/gitty/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/gordonwritescode/gitty/issues/35/comments","events_url":"https://api.github.com/repos/gordonwritescode/gitty/issues/35/events","html_url":"https://github.com/gordonwritescode/gitty/issues/35","id":48619358,"number":35,"title":"filename containing 'username' or 'password' causes crash","user":{"login":"ColmMcBarron","id":998625,"avatar_url":"https://avatars.githubusercontent.com/u/998625?v=3","gravatar_id":"","url":"https://api.github.com/users/ColmMcBarron","html_url":"https://github.com/ColmMcBarron","followers_url":"https://api.github.com/users/ColmMcBarron/followers","following_url":"https://api.github.com/users/ColmMcBarron/following{/other_user}","gists_url":"https://api.github.com/users/ColmMcBarron/gists{/gist_id}","starred_url":"https://api.github.com/users/ColmMcBarron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColmMcBarron/subscriptions","organizations_url":"https://api.github.com/users/ColmMcBarron/orgs","repos_url":"https://api.github.com/users/ColmMcBarron/repos","events_url":"https://api.github.com/users/ColmMcBarron/events{/privacy}","received_events_url":"https://api.github.com/users/ColmMcBarron/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gordonwritescode/gitty/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"gordonwritescode","id":1188875,"avatar_url":"https://avatars.githubusercontent.com/u/1188875?v=3","gravatar_id":"","url":"https://api.github.com/users/gordonwritescode","html_url":"https://github.com/gordonwritescode","followers_url":"https://api.github.com/users/gordonwritescode/followers","following_url":"https://api.github.com/users/gordonwritescode/following{/other_user}","gists_url":"https://api.github.com/users/gordonwritescode/gists{/gist_id}","starred_url":"https://api.github.com/users/gordonwritescode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gordonwritescode/subscriptions","organizations_url":"https://api.github.com/users/gordonwritescode/orgs","repos_url":"https://api.github.com/users/gordonwritescode/repos","events_url":"https://api.github.com/users/gordonwritescode/events{/privacy}","received_events_url":"https://api.github.com/users/gordonwritescode/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2014-11-13T10:18:07Z","updated_at":"2015-02-25T16:22:10Z","closed_at":"2015-02-25T16:22:10Z","body":"Noticed recently when doing a git pull via gitty, the app crashes, complaining about creds.pass.\r\n\r\nI've isolated it to the following piece of code in classes/repository.js\r\n\r\n    function sync(path, operation, remote, branch, flags, callback, creds) {\r\n        var operations = [operation, remote, branch].concat(flags || [])\r\n          , pterm = pty.spawn('git', operations, { cwd : path })\r\n          , repo = this\r\n          , err\r\n          , succ;\r\n        pterm.on('data', function(data) {\r\n                var prompt = data.toLowerCase();\r\n                if (prompt.indexOf('username') > -1) {\r\n                        pterm.write(creds.user + '\\r');\r\n                } else if (prompt.indexOf('password') > -1) {\r\n                      pterm.write(creds.pass + '\\r');\r\n                } else if ((prompt.indexOf('error') > -1) || (prompt.indexOf('fatal') > -1)) {\r\n                      err = parse['syncErr'](prompt);\r\n                } else {\r\n                        succ = parse['syncSuccess'](prompt);\r\n                }\r\n        });\r\n        pterm.on('exit', function() {\r\n                if (callback && typeof callback === 'function') callback.call(repo, err, succ);\r\n        });\r\n    };\r\n\r\nIf I comment out the lines creds,user and creds.pass it works perfectly. Further investigation, it seems that it was stalling during printing the files changed in the git commit, in particular with a file called 'passwordStrengthMeter.css', so was picking up the string 'password' and assuming it was a password request. I assume this would also be a problem for 'username' as well.\r\n\r\nI'm not sure what the fix would be here, for now I've just commented out the offending line.\r\n"}}