Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Not getting valid form data after all 302s #8

Description

@Marakai

I'm receiving an error in both direct call and container that "response did not contain a valid SAML assertion" despite valid username/email and password (verified via console), so I went to single stepping through with an IDE.

formresponse = session.get(url, verify=True)

returns a 200, so all is still well here.

idpauthformsubmiturl contains https://console.jumpcloud.com/login?context=sso&redirectTo=saml2%2Faws after the 302s which seems correct, however

formsoup = BeautifulSoup(formresponse.text, "html.parser")

doesn't seem to contain what it's looking for:

<!DOCTYPE html>
<html class="jc-ux2" lang="en"><head><title>JumpCloud</title><link href="img/favicon.ico" rel="icon"/><meta content="text/html; charset=utf-8" http-equiv="content-type"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/><meta content="#003e52" name="theme-color"/><link href="jumpcloud-login.4b1bcb1a.css" rel="stylesheet"/></head><body class="login-viewport" style="background-color:#063240;"><div class="login-container"><div class="login-content"></div></div><script src="jumpcloud-login.afd379c8.js"></script><script>/* Add Google Tag Manager to the /login page when not running locally */
(function(w, d, s, l, i) {
  if (/localhost/.test(window.location)) {
    return;
  }
  w[l] = w[l] || [];
  w[l].push(
    {
      'gtm.start': new Date().getTime(),
      event: 'gtm.js'
    }
  );
  var f = d.getElementsByTagName(s)[0],
    j = d.createElement(s),
    dl = l != 'dataLayer' ? '&l=' + l : '';
  j.async = true;
  j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
  f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-TCQM2R');</script></body></html>

As a result the two find_all() operations fail, meaning the loops return no matches and the POST returns with a 405, unsurprisingly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions