{"action":"created","comment":{"url":"https://api.github.com/repos/sportngin/saml_idp/pulls/comments/55865974","id":55865974,"diff_hunk":"@@ -1,32 +1,46 @@\n require 'spec_helper'\n module SamlIdp\n   describe Request do\n-    let(:raw_request) { \"<samlp:AuthnRequest AssertionConsumerServiceURL='http://localhost:3000/saml/consume' Destination='http://localhost:1337/saml/auth' ID='_af43d1a0-e111-0130-661a-3c0754403fdb' IssueInstant='2013-08-06T22:01:35Z' Version='2.0' xmlns:samlp='urn:oasis:names:tc:SAML:2.0:protocol'><saml:Issuer xmlns:saml='urn:oasis:names:tc:SAML:2.0:assertion'>localhost:3000</saml:Issuer><samlp:NameIDPolicy AllowCreate='true' Format='urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' xmlns:samlp='urn:oasis:names:tc:SAML:2.0:protocol'/></samlp:AuthnRequest>\" }\n-    subject { described_class.new raw_request }\n+    describe \"with an inflated and valid SAML request\" do\n+      let(:raw_request) { \"<samlp:AuthnRequest AssertionConsumerServiceURL='http://localhost:3000/saml/consume' Destination='http://localhost:1337/saml/auth' ID='_af43d1a0-e111-0130-661a-3c0754403fdb' IssueInstant='2013-08-06T22:01:35Z' Version='2.0' xmlns:samlp='urn:oasis:names:tc:SAML:2.0:protocol'><saml:Issuer xmlns:saml='urn:oasis:names:tc:SAML:2.0:assertion'>localhost:3000</saml:Issuer><samlp:NameIDPolicy AllowCreate='true' Format='urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' xmlns:samlp='urn:oasis:names:tc:SAML:2.0:protocol'/></samlp:AuthnRequest>\" }\n+      subject { described_class.new raw_request }\n \n-    it \"has a valid request_id\" do\n-      subject.request_id.should == \"_af43d1a0-e111-0130-661a-3c0754403fdb\"\n-    end\n+      it \"has a valid request_id\" do\n+        subject.request_id.should == \"_af43d1a0-e111-0130-661a-3c0754403fdb\"\n+      end\n \n-    it \"has a valid acs_url\" do\n-      subject.acs_url.should == \"http://localhost:3000/saml/consume\"\n-    end\n+      it \"has a valid acs_url\" do\n+        subject.acs_url.should == \"http://localhost:3000/saml/consume\"\n+      end\n \n-    it \"has a valid service_provider\" do\n-      subject.service_provider.should be_a ServiceProvider\n-    end\n+      it \"has a valid service_provider\" do\n+        subject.service_provider.should be_a ServiceProvider\n+      end\n \n-    it \"has a valid service_provider\" do\n-      subject.service_provider.should be_truthy\n-    end\n+      it \"has a valid service_provider\" do\n+        subject.service_provider.should be_truthy\n+      end\n+\n+      it \"has a valid issuer\" do\n+        subject.issuer.should == \"localhost:3000\"\n+      end\n \n-    it \"has a valid issuer\" do\n-      subject.issuer.should == \"localhost:3000\"\n+      it \"has a valid valid_signature\" do\n+        subject.valid_signature?.should be_truthy\n+      end\n     end\n \n-    it \"has a valid valid_signature\" do\n-      subject.valid_signature?.should be_truthy\n+    describe \"with an inflated but invalid SAML request\" do\n+      it \"returns an empty string when \" do\n+        described_class.new \"<samlp:AuthnRequest></samlp:AuthnRequest>\"\n+        subject.acs_url == \"\"","path":"spec/lib/saml_idp/request_spec.rb","position":54,"original_position":54,"commit_id":"66714394fcbe5023a86ed823e73c05fe541be229","original_commit_id":"66714394fcbe5023a86ed823e73c05fe541be229","user":{"login":"jphenow","id":319230,"avatar_url":"https://avatars.githubusercontent.com/u/319230?v=3","gravatar_id":"","url":"https://api.github.com/users/jphenow","html_url":"https://github.com/jphenow","followers_url":"https://api.github.com/users/jphenow/followers","following_url":"https://api.github.com/users/jphenow/following{/other_user}","gists_url":"https://api.github.com/users/jphenow/gists{/gist_id}","starred_url":"https://api.github.com/users/jphenow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jphenow/subscriptions","organizations_url":"https://api.github.com/users/jphenow/orgs","repos_url":"https://api.github.com/users/jphenow/repos","events_url":"https://api.github.com/users/jphenow/events{/privacy}","received_events_url":"https://api.github.com/users/jphenow/received_events","type":"User","site_admin":false},"body":"needs a `should` assertion just realized","created_at":"2016-03-11T18:14:42Z","updated_at":"2016-03-11T18:14:42Z","html_url":"https://github.com/sportngin/saml_idp/pull/27#discussion_r55865974","pull_request_url":"https://api.github.com/repos/sportngin/saml_idp/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/sportngin/saml_idp/pulls/comments/55865974"},"html":{"href":"https://github.com/sportngin/saml_idp/pull/27#discussion_r55865974"},"pull_request":{"href":"https://api.github.com/repos/sportngin/saml_idp/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/sportngin/saml_idp/pulls/27","id":40331620,"html_url":"https://github.com/sportngin/saml_idp/pull/27","diff_url":"https://github.com/sportngin/saml_idp/pull/27.diff","patch_url":"https://github.com/sportngin/saml_idp/pull/27.patch","issue_url":"https://api.github.com/repos/sportngin/saml_idp/issues/27","number":27,"state":"open","locked":false,"title":"Fixes issues when SAMLRequest is nil or invalid.","user":{"login":"fdeschenes","id":876332,"avatar_url":"https://avatars.githubusercontent.com/u/876332?v=3","gravatar_id":"","url":"https://api.github.com/users/fdeschenes","html_url":"https://github.com/fdeschenes","followers_url":"https://api.github.com/users/fdeschenes/followers","following_url":"https://api.github.com/users/fdeschenes/following{/other_user}","gists_url":"https://api.github.com/users/fdeschenes/gists{/gist_id}","starred_url":"https://api.github.com/users/fdeschenes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdeschenes/subscriptions","organizations_url":"https://api.github.com/users/fdeschenes/orgs","repos_url":"https://api.github.com/users/fdeschenes/repos","events_url":"https://api.github.com/users/fdeschenes/events{/privacy}","received_events_url":"https://api.github.com/users/fdeschenes/received_events","type":"User","site_admin":false},"body":"When `SAMLRequest` is not valid, Zlib throws a `Zlib::BufError` which isn't handled and when it's `nil` (i.e. not submitted by the user), `acs_url` assumes `authn_request` is a hash which is not always the case.","created_at":"2015-07-20T08:34:59Z","updated_at":"2016-03-11T18:14:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5684fa46fed3bdb16902e204792d031d6ef4c5b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sportngin/saml_idp/pulls/27/commits","review_comments_url":"https://api.github.com/repos/sportngin/saml_idp/pulls/27/comments","review_comment_url":"https://api.github.com/repos/sportngin/saml_idp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sportngin/saml_idp/issues/27/comments","statuses_url":"https://api.github.com/repos/sportngin/saml_idp/statuses/66714394fcbe5023a86ed823e73c05fe541be229","head":{"label":"meowbox:master","ref":"master","sha":"66714394fcbe5023a86ed823e73c05fe541be229","user":{"login":"meowbox","id":6796950,"avatar_url":"https://avatars.githubusercontent.com/u/6796950?v=3","gravatar_id":"","url":"https://api.github.com/users/meowbox","html_url":"https://github.com/meowbox","followers_url":"https://api.github.com/users/meowbox/followers","following_url":"https://api.github.com/users/meowbox/following{/other_user}","gists_url":"https://api.github.com/users/meowbox/gists{/gist_id}","starred_url":"https://api.github.com/users/meowbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meowbox/subscriptions","organizations_url":"https://api.github.com/users/meowbox/orgs","repos_url":"https://api.github.com/users/meowbox/repos","events_url":"https://api.github.com/users/meowbox/events{/privacy}","received_events_url":"https://api.github.com/users/meowbox/received_events","type":"Organization","site_admin":false},"repo":{"id":39371205,"name":"saml_idp","full_name":"meowbox/saml_idp","owner":{"login":"meowbox","id":6796950,"avatar_url":"https://avatars.githubusercontent.com/u/6796950?v=3","gravatar_id":"","url":"https://api.github.com/users/meowbox","html_url":"https://github.com/meowbox","followers_url":"https://api.github.com/users/meowbox/followers","following_url":"https://api.github.com/users/meowbox/following{/other_user}","gists_url":"https://api.github.com/users/meowbox/gists{/gist_id}","starred_url":"https://api.github.com/users/meowbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meowbox/subscriptions","organizations_url":"https://api.github.com/users/meowbox/orgs","repos_url":"https://api.github.com/users/meowbox/repos","events_url":"https://api.github.com/users/meowbox/events{/privacy}","received_events_url":"https://api.github.com/users/meowbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/meowbox/saml_idp","description":"","fork":true,"url":"https://api.github.com/repos/meowbox/saml_idp","forks_url":"https://api.github.com/repos/meowbox/saml_idp/forks","keys_url":"https://api.github.com/repos/meowbox/saml_idp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meowbox/saml_idp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meowbox/saml_idp/teams","hooks_url":"https://api.github.com/repos/meowbox/saml_idp/hooks","issue_events_url":"https://api.github.com/repos/meowbox/saml_idp/issues/events{/number}","events_url":"https://api.github.com/repos/meowbox/saml_idp/events","assignees_url":"https://api.github.com/repos/meowbox/saml_idp/assignees{/user}","branches_url":"https://api.github.com/repos/meowbox/saml_idp/branches{/branch}","tags_url":"https://api.github.com/repos/meowbox/saml_idp/tags","blobs_url":"https://api.github.com/repos/meowbox/saml_idp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meowbox/saml_idp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meowbox/saml_idp/git/refs{/sha}","trees_url":"https://api.github.com/repos/meowbox/saml_idp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meowbox/saml_idp/statuses/{sha}","languages_url":"https://api.github.com/repos/meowbox/saml_idp/languages","stargazers_url":"https://api.github.com/repos/meowbox/saml_idp/stargazers","contributors_url":"https://api.github.com/repos/meowbox/saml_idp/contributors","subscribers_url":"https://api.github.com/repos/meowbox/saml_idp/subscribers","subscription_url":"https://api.github.com/repos/meowbox/saml_idp/subscription","commits_url":"https://api.github.com/repos/meowbox/saml_idp/commits{/sha}","git_commits_url":"https://api.github.com/repos/meowbox/saml_idp/git/commits{/sha}","comments_url":"https://api.github.com/repos/meowbox/saml_idp/comments{/number}","issue_comment_url":"https://api.github.com/repos/meowbox/saml_idp/issues/comments{/number}","contents_url":"https://api.github.com/repos/meowbox/saml_idp/contents/{+path}","compare_url":"https://api.github.com/repos/meowbox/saml_idp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meowbox/saml_idp/merges","archive_url":"https://api.github.com/repos/meowbox/saml_idp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meowbox/saml_idp/downloads","issues_url":"https://api.github.com/repos/meowbox/saml_idp/issues{/number}","pulls_url":"https://api.github.com/repos/meowbox/saml_idp/pulls{/number}","milestones_url":"https://api.github.com/repos/meowbox/saml_idp/milestones{/number}","notifications_url":"https://api.github.com/repos/meowbox/saml_idp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meowbox/saml_idp/labels{/name}","releases_url":"https://api.github.com/repos/meowbox/saml_idp/releases{/id}","deployments_url":"https://api.github.com/repos/meowbox/saml_idp/deployments","created_at":"2015-07-20T08:10:24Z","updated_at":"2015-07-20T08:10:25Z","pushed_at":"2015-08-21T22:48:49Z","git_url":"git://github.com/meowbox/saml_idp.git","ssh_url":"git@github.com:meowbox/saml_idp.git","clone_url":"https://github.com/meowbox/saml_idp.git","svn_url":"https://github.com/meowbox/saml_idp","homepage":null,"size":297,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"sportngin:master","ref":"master","sha":"5d7e2a4cf5fbba0a883b3c8497048d33ff38f377","user":{"login":"sportngin","id":3728684,"avatar_url":"https://avatars.githubusercontent.com/u/3728684?v=3","gravatar_id":"","url":"https://api.github.com/users/sportngin","html_url":"https://github.com/sportngin","followers_url":"https://api.github.com/users/sportngin/followers","following_url":"https://api.github.com/users/sportngin/following{/other_user}","gists_url":"https://api.github.com/users/sportngin/gists{/gist_id}","starred_url":"https://api.github.com/users/sportngin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sportngin/subscriptions","organizations_url":"https://api.github.com/users/sportngin/orgs","repos_url":"https://api.github.com/users/sportngin/repos","events_url":"https://api.github.com/users/sportngin/events{/privacy}","received_events_url":"https://api.github.com/users/sportngin/received_events","type":"Organization","site_admin":false},"repo":{"id":11909053,"name":"saml_idp","full_name":"sportngin/saml_idp","owner":{"login":"sportngin","id":3728684,"avatar_url":"https://avatars.githubusercontent.com/u/3728684?v=3","gravatar_id":"","url":"https://api.github.com/users/sportngin","html_url":"https://github.com/sportngin","followers_url":"https://api.github.com/users/sportngin/followers","following_url":"https://api.github.com/users/sportngin/following{/other_user}","gists_url":"https://api.github.com/users/sportngin/gists{/gist_id}","starred_url":"https://api.github.com/users/sportngin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sportngin/subscriptions","organizations_url":"https://api.github.com/users/sportngin/orgs","repos_url":"https://api.github.com/users/sportngin/repos","events_url":"https://api.github.com/users/sportngin/events{/privacy}","received_events_url":"https://api.github.com/users/sportngin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sportngin/saml_idp","description":"","fork":false,"url":"https://api.github.com/repos/sportngin/saml_idp","forks_url":"https://api.github.com/repos/sportngin/saml_idp/forks","keys_url":"https://api.github.com/repos/sportngin/saml_idp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sportngin/saml_idp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sportngin/saml_idp/teams","hooks_url":"https://api.github.com/repos/sportngin/saml_idp/hooks","issue_events_url":"https://api.github.com/repos/sportngin/saml_idp/issues/events{/number}","events_url":"https://api.github.com/repos/sportngin/saml_idp/events","assignees_url":"https://api.github.com/repos/sportngin/saml_idp/assignees{/user}","branches_url":"https://api.github.com/repos/sportngin/saml_idp/branches{/branch}","tags_url":"https://api.github.com/repos/sportngin/saml_idp/tags","blobs_url":"https://api.github.com/repos/sportngin/saml_idp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sportngin/saml_idp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sportngin/saml_idp/git/refs{/sha}","trees_url":"https://api.github.com/repos/sportngin/saml_idp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sportngin/saml_idp/statuses/{sha}","languages_url":"https://api.github.com/repos/sportngin/saml_idp/languages","stargazers_url":"https://api.github.com/repos/sportngin/saml_idp/stargazers","contributors_url":"https://api.github.com/repos/sportngin/saml_idp/contributors","subscribers_url":"https://api.github.com/repos/sportngin/saml_idp/subscribers","subscription_url":"https://api.github.com/repos/sportngin/saml_idp/subscription","commits_url":"https://api.github.com/repos/sportngin/saml_idp/commits{/sha}","git_commits_url":"https://api.github.com/repos/sportngin/saml_idp/git/commits{/sha}","comments_url":"https://api.github.com/repos/sportngin/saml_idp/comments{/number}","issue_comment_url":"https://api.github.com/repos/sportngin/saml_idp/issues/comments{/number}","contents_url":"https://api.github.com/repos/sportngin/saml_idp/contents/{+path}","compare_url":"https://api.github.com/repos/sportngin/saml_idp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sportngin/saml_idp/merges","archive_url":"https://api.github.com/repos/sportngin/saml_idp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sportngin/saml_idp/downloads","issues_url":"https://api.github.com/repos/sportngin/saml_idp/issues{/number}","pulls_url":"https://api.github.com/repos/sportngin/saml_idp/pulls{/number}","milestones_url":"https://api.github.com/repos/sportngin/saml_idp/milestones{/number}","notifications_url":"https://api.github.com/repos/sportngin/saml_idp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sportngin/saml_idp/labels{/name}","releases_url":"https://api.github.com/repos/sportngin/saml_idp/releases{/id}","deployments_url":"https://api.github.com/repos/sportngin/saml_idp/deployments","created_at":"2013-08-05T21:18:16Z","updated_at":"2016-02-18T08:34:30Z","pushed_at":"2016-03-11T18:10:12Z","git_url":"git://github.com/sportngin/saml_idp.git","ssh_url":"git@github.com:sportngin/saml_idp.git","clone_url":"https://github.com/sportngin/saml_idp.git","svn_url":"https://github.com/sportngin/saml_idp","homepage":null,"size":224,"stargazers_count":29,"watchers_count":29,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":15,"forks":28,"open_issues":15,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sportngin/saml_idp/pulls/27"},"html":{"href":"https://github.com/sportngin/saml_idp/pull/27"},"issue":{"href":"https://api.github.com/repos/sportngin/saml_idp/issues/27"},"comments":{"href":"https://api.github.com/repos/sportngin/saml_idp/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/sportngin/saml_idp/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/sportngin/saml_idp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sportngin/saml_idp/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/sportngin/saml_idp/statuses/66714394fcbe5023a86ed823e73c05fe541be229"}}}}