{"action":"created","comment":{"url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/comments/74161830","id":74161830,"diff_hunk":"@@ -180,33 +180,58 @@ SAML.prototype.certToPEM = function (cert) {\n };\n \n SAML.prototype.checkSAMLStatus = function (xmlDomDoc) {\n-\tvar status = {StatusCodeValue:null, StatusMessage:null, StatusDetail:null}\n+\tvar status = {StatusCodeValue:null, StatusMessage:null, StatusDetail:null}, statusCodeValueNode = null, statusMessageNode = null, statusDetailNode = null;\n \n-\tvar statusCodeValueNode = xmlCrypto.xpath(xmlDomDoc, \"//*[local-name(.)='StatusCode']\")[0];\n-\tif(statusCodeValueNode)\n-\t{\n+\ttry{\n+    statusCodeValueNode = xmlCrypto.xpath(xmlDomDoc, \"//*[local-name(.)='StatusCode']\")[0];\n+  }catch(err){\n+    // Error Handling\n+  }\n+\n+\tif(statusCodeValueNode = true || typeof statusCodeValueNode != 'undefined'){","path":"lib/saml.js","position":16,"original_position":16,"commit_id":"4a605a2b29a10376c5fbc1991475d4a0fdc4f2e4","original_commit_id":"4a605a2b29a10376c5fbc1991475d4a0fdc4f2e4","user":{"login":"lmarkus","id":736932,"avatar_url":"https://avatars.githubusercontent.com/u/736932?v=3","gravatar_id":"","url":"https://api.github.com/users/lmarkus","html_url":"https://github.com/lmarkus","followers_url":"https://api.github.com/users/lmarkus/followers","following_url":"https://api.github.com/users/lmarkus/following{/other_user}","gists_url":"https://api.github.com/users/lmarkus/gists{/gist_id}","starred_url":"https://api.github.com/users/lmarkus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmarkus/subscriptions","organizations_url":"https://api.github.com/users/lmarkus/orgs","repos_url":"https://api.github.com/users/lmarkus/repos","events_url":"https://api.github.com/users/lmarkus/events{/privacy}","received_events_url":"https://api.github.com/users/lmarkus/received_events","type":"User","site_admin":false},"body":"Sorry, missed this on the first review pass.\r\nThis `if(typeof statusCodeValueNode != 'undefined')` is sufficient.\r\n\r\nIf it's not undefined,  we set the value.\r\n\r\n(Also, minor bug, you used a single `=` when comparing to true. That is assignment, not comparison), but it doesn't matter since it ill be removed.\r\n\r\nI can merge after this","created_at":"2016-08-09T23:16:12Z","updated_at":"2016-08-09T23:16:12Z","html_url":"https://github.com/lmarkus/passport-saml-encrypted/pull/17#discussion_r74161830","pull_request_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/comments/74161830"},"html":{"href":"https://github.com/lmarkus/passport-saml-encrypted/pull/17#discussion_r74161830"},"pull_request":{"href":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/17","id":80487955,"html_url":"https://github.com/lmarkus/passport-saml-encrypted/pull/17","diff_url":"https://github.com/lmarkus/passport-saml-encrypted/pull/17.diff","patch_url":"https://github.com/lmarkus/passport-saml-encrypted/pull/17.patch","issue_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/issues/17","number":17,"state":"open","locked":false,"title":"Add Try/Catch for xml-crypto","user":{"login":"jonfairbanks","id":1957806,"avatar_url":"https://avatars.githubusercontent.com/u/1957806?v=3","gravatar_id":"","url":"https://api.github.com/users/jonfairbanks","html_url":"https://github.com/jonfairbanks","followers_url":"https://api.github.com/users/jonfairbanks/followers","following_url":"https://api.github.com/users/jonfairbanks/following{/other_user}","gists_url":"https://api.github.com/users/jonfairbanks/gists{/gist_id}","starred_url":"https://api.github.com/users/jonfairbanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonfairbanks/subscriptions","organizations_url":"https://api.github.com/users/jonfairbanks/orgs","repos_url":"https://api.github.com/users/jonfairbanks/repos","events_url":"https://api.github.com/users/jonfairbanks/events{/privacy}","received_events_url":"https://api.github.com/users/jonfairbanks/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-08T17:15:00Z","updated_at":"2016-08-09T23:16:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17a232628d49e7a7b13b50488f55f5335e56718a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/17/commits","review_comments_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/17/comments","review_comment_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/issues/17/comments","statuses_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/statuses/4a605a2b29a10376c5fbc1991475d4a0fdc4f2e4","head":{"label":"jonfairbanks:master","ref":"master","sha":"4a605a2b29a10376c5fbc1991475d4a0fdc4f2e4","user":{"login":"jonfairbanks","id":1957806,"avatar_url":"https://avatars.githubusercontent.com/u/1957806?v=3","gravatar_id":"","url":"https://api.github.com/users/jonfairbanks","html_url":"https://github.com/jonfairbanks","followers_url":"https://api.github.com/users/jonfairbanks/followers","following_url":"https://api.github.com/users/jonfairbanks/following{/other_user}","gists_url":"https://api.github.com/users/jonfairbanks/gists{/gist_id}","starred_url":"https://api.github.com/users/jonfairbanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonfairbanks/subscriptions","organizations_url":"https://api.github.com/users/jonfairbanks/orgs","repos_url":"https://api.github.com/users/jonfairbanks/repos","events_url":"https://api.github.com/users/jonfairbanks/events{/privacy}","received_events_url":"https://api.github.com/users/jonfairbanks/received_events","type":"User","site_admin":false},"repo":{"id":64957833,"name":"passport-saml-encrypted","full_name":"jonfairbanks/passport-saml-encrypted","owner":{"login":"jonfairbanks","id":1957806,"avatar_url":"https://avatars.githubusercontent.com/u/1957806?v=3","gravatar_id":"","url":"https://api.github.com/users/jonfairbanks","html_url":"https://github.com/jonfairbanks","followers_url":"https://api.github.com/users/jonfairbanks/followers","following_url":"https://api.github.com/users/jonfairbanks/following{/other_user}","gists_url":"https://api.github.com/users/jonfairbanks/gists{/gist_id}","starred_url":"https://api.github.com/users/jonfairbanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonfairbanks/subscriptions","organizations_url":"https://api.github.com/users/jonfairbanks/orgs","repos_url":"https://api.github.com/users/jonfairbanks/repos","events_url":"https://api.github.com/users/jonfairbanks/events{/privacy}","received_events_url":"https://api.github.com/users/jonfairbanks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonfairbanks/passport-saml-encrypted","description":"A strategy for Passport authentication that supports encrypted SAML responses","fork":true,"url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted","forks_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/forks","keys_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/teams","hooks_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/hooks","issue_events_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/issues/events{/number}","events_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/events","assignees_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/assignees{/user}","branches_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/branches{/branch}","tags_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/tags","blobs_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/statuses/{sha}","languages_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/languages","stargazers_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/stargazers","contributors_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/contributors","subscribers_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/subscribers","subscription_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/subscription","commits_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/contents/{+path}","compare_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/merges","archive_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/downloads","issues_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/issues{/number}","pulls_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/pulls{/number}","milestones_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/milestones{/number}","notifications_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/labels{/name}","releases_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/releases{/id}","deployments_url":"https://api.github.com/repos/jonfairbanks/passport-saml-encrypted/deployments","created_at":"2016-08-04T18:24:59Z","updated_at":"2016-08-04T18:25:00Z","pushed_at":"2016-08-09T21:01:22Z","git_url":"git://github.com/jonfairbanks/passport-saml-encrypted.git","ssh_url":"git@github.com:jonfairbanks/passport-saml-encrypted.git","clone_url":"https://github.com/jonfairbanks/passport-saml-encrypted.git","svn_url":"https://github.com/jonfairbanks/passport-saml-encrypted","homepage":null,"size":36,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lmarkus:master","ref":"master","sha":"57b5d47bdef7b92b17e53ca076a55ccbaa1ccde2","user":{"login":"lmarkus","id":736932,"avatar_url":"https://avatars.githubusercontent.com/u/736932?v=3","gravatar_id":"","url":"https://api.github.com/users/lmarkus","html_url":"https://github.com/lmarkus","followers_url":"https://api.github.com/users/lmarkus/followers","following_url":"https://api.github.com/users/lmarkus/following{/other_user}","gists_url":"https://api.github.com/users/lmarkus/gists{/gist_id}","starred_url":"https://api.github.com/users/lmarkus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmarkus/subscriptions","organizations_url":"https://api.github.com/users/lmarkus/orgs","repos_url":"https://api.github.com/users/lmarkus/repos","events_url":"https://api.github.com/users/lmarkus/events{/privacy}","received_events_url":"https://api.github.com/users/lmarkus/received_events","type":"User","site_admin":false},"repo":{"id":16442696,"name":"passport-saml-encrypted","full_name":"lmarkus/passport-saml-encrypted","owner":{"login":"lmarkus","id":736932,"avatar_url":"https://avatars.githubusercontent.com/u/736932?v=3","gravatar_id":"","url":"https://api.github.com/users/lmarkus","html_url":"https://github.com/lmarkus","followers_url":"https://api.github.com/users/lmarkus/followers","following_url":"https://api.github.com/users/lmarkus/following{/other_user}","gists_url":"https://api.github.com/users/lmarkus/gists{/gist_id}","starred_url":"https://api.github.com/users/lmarkus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmarkus/subscriptions","organizations_url":"https://api.github.com/users/lmarkus/orgs","repos_url":"https://api.github.com/users/lmarkus/repos","events_url":"https://api.github.com/users/lmarkus/events{/privacy}","received_events_url":"https://api.github.com/users/lmarkus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lmarkus/passport-saml-encrypted","description":"A strategy for Passport authentication that supports encrypted SAML responses","fork":false,"url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted","forks_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/forks","keys_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/teams","hooks_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/hooks","issue_events_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/issues/events{/number}","events_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/events","assignees_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/assignees{/user}","branches_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/branches{/branch}","tags_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/tags","blobs_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/git/refs{/sha}","trees_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/statuses/{sha}","languages_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/languages","stargazers_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/stargazers","contributors_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/contributors","subscribers_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/subscribers","subscription_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/subscription","commits_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/commits{/sha}","git_commits_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/git/commits{/sha}","comments_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/comments{/number}","issue_comment_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/issues/comments{/number}","contents_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/contents/{+path}","compare_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/merges","archive_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/downloads","issues_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/issues{/number}","pulls_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls{/number}","milestones_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/milestones{/number}","notifications_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/labels{/name}","releases_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/releases{/id}","deployments_url":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/deployments","created_at":"2014-02-01T21:11:13Z","updated_at":"2016-08-07T21:39:01Z","pushed_at":"2016-08-09T21:01:23Z","git_url":"git://github.com/lmarkus/passport-saml-encrypted.git","ssh_url":"git@github.com:lmarkus/passport-saml-encrypted.git","clone_url":"https://github.com/lmarkus/passport-saml-encrypted.git","svn_url":"https://github.com/lmarkus/passport-saml-encrypted","homepage":null,"size":38,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":6,"forks":13,"open_issues":6,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/17"},"html":{"href":"https://github.com/lmarkus/passport-saml-encrypted/pull/17"},"issue":{"href":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/issues/17"},"comments":{"href":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/lmarkus/passport-saml-encrypted/statuses/4a605a2b29a10376c5fbc1991475d4a0fdc4f2e4"}}}}
{"actor":{"display_login":"lmarkus"}}