{"action":"created","issue":{"url":"https://api.github.com/repos/Clever/saml2/issues/149","repository_url":"https://api.github.com/repos/Clever/saml2","labels_url":"https://api.github.com/repos/Clever/saml2/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/Clever/saml2/issues/149/comments","events_url":"https://api.github.com/repos/Clever/saml2/issues/149/events","html_url":"https://github.com/Clever/saml2/issues/149","id":360349609,"node_id":"MDU6SXNzdWUzNjAzNDk2MDk=","number":149,"title":"sp.post_assert is throwing a 500 Internal Service Error","user":{"login":"kogden","id":16943467,"node_id":"MDQ6VXNlcjE2OTQzNDY3","avatar_url":"https://avatars3.githubusercontent.com/u/16943467?v=4","gravatar_id":"","url":"https://api.github.com/users/kogden","html_url":"https://github.com/kogden","followers_url":"https://api.github.com/users/kogden/followers","following_url":"https://api.github.com/users/kogden/following{/other_user}","gists_url":"https://api.github.com/users/kogden/gists{/gist_id}","starred_url":"https://api.github.com/users/kogden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kogden/subscriptions","organizations_url":"https://api.github.com/users/kogden/orgs","repos_url":"https://api.github.com/users/kogden/repos","events_url":"https://api.github.com/users/kogden/events{/privacy}","received_events_url":"https://api.github.com/users/kogden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-14T15:22:09Z","updated_at":"2018-10-16T19:14:22Z","closed_at":null,"author_association":"NONE","body":"So my service was working correctly up until yesterday. Now our login service is working, but when it comes to asserting the login and sending the webpage files I'm receiving a:\r\n`Internal Service Error`\r\n\r\nHere is the function throwing the error:\r\n```// Assert endpoint for when login completes\r\napp.post(\"/dashboard\", function (req, res) {\r\n  console.log(\"sp: Asserting login\");\r\n  var options = { request_body: req.body };\r\n\r\n  sp.post_assert(idp, options, function (err, saml_response) {\r\n    if (err != null)\r\n      return res.send(500);                     // currently throwing this error\r\n    console.log('running post_assert func');\r\n    // Save name_id and session_index for logout\r\n    last_response = saml_response.user.attributes['urn:oid:2.5.4.42'];        // store username in variable\r\n    name_id = saml_response.user.name_id;\r\n    session_index = saml_response.user.session_index;\r\n    console.log('running res.sendfile');\r\n\r\n    res.sendfile(\"./dist/PROJECT_NAME/index.html\");\r\n\r\n    console.log('/dashboard post complete');\r\n  });\r\n});\r\n```\r\n\r\nThe output is\r\n`sp:Asserting login`\r\n\r\nand the rest isn't run. This code was working fine up until a couple days ago. Anyone got an idea?"},"comment":{"url":"https://api.github.com/repos/Clever/saml2/issues/comments/430363350","html_url":"https://github.com/Clever/saml2/issues/149#issuecomment-430363350","issue_url":"https://api.github.com/repos/Clever/saml2/issues/149","id":430363350,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDM2MzM1MA==","user":{"login":"chveragad","id":11677578,"node_id":"MDQ6VXNlcjExNjc3NTc4","avatar_url":"https://avatars2.githubusercontent.com/u/11677578?v=4","gravatar_id":"","url":"https://api.github.com/users/chveragad","html_url":"https://github.com/chveragad","followers_url":"https://api.github.com/users/chveragad/followers","following_url":"https://api.github.com/users/chveragad/following{/other_user}","gists_url":"https://api.github.com/users/chveragad/gists{/gist_id}","starred_url":"https://api.github.com/users/chveragad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chveragad/subscriptions","organizations_url":"https://api.github.com/users/chveragad/orgs","repos_url":"https://api.github.com/users/chveragad/repos","events_url":"https://api.github.com/users/chveragad/events{/privacy}","received_events_url":"https://api.github.com/users/chveragad/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T19:14:22Z","updated_at":"2018-10-16T19:14:22Z","author_association":"NONE","body":"Any resolution on this one? I am encountering the same from our side but it is only for a specific scenario. It is when from an external website that the post request with the saml response is received that this error is received. This scenario is:\r\n\r\nMain website with sso login —> click a link from the main website to invoke another app with post request of saml response —> Service provider (SP)\r\n\r\nHowever the scenario below is fine is fine:\r\nSP —> IAM sso login —> SP it is working \r\n\r\nAlso, is cookie important in the saml response validation? \r\n\r\nRegards "}}
{"actor":{"display_login":"chveragad"}}