staging.seapax.se Open in urlscan Pro
85.89.72.22  Public Scan

URL: https://staging.seapax.se/
Submission: On November 17 via api from US — Scanned from SE

Form analysis 1 forms found in the DOM

Name: loginformPOST https://staging.seapax.se/wp-login.php

<form class="wp-staging-form" name="loginform" id="loginform" action="https://staging.seapax.se/wp-login.php" method="post">
  <div class="form-group login-username">
    <label for="user_login">Username or Email Address</label>
    <input type="text" name="wpstg-username" id="user_login" class="input form-control" value="" size="20">
  </div>
  <div class="form-group login-password">
    <label for="user_pass">Password</label>
    <input type="password" name="wpstg-pass" id="user_pass" class="input form-control" value="" size="20">
  </div>
  <div class="form-group login-remember"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever"> <span>Remember Me</span></label></div>
  <div class="login-submit">
    <button type="button" name="wpstg-submit" id="wp-submit" class="btn" value="Log In">Login</button>
    <input type="hidden" name="redirect_to" value="https://staging.seapax.se/">
  </div>
  <p class="wpstg-default-login-link"> If login is not possible, please use the <a href="https://staging.seapax.se/wp-login.php">default login form</a>. </p>
  <div class="password-lost">
    <a href="https://staging.seapax.se/mitt-konto/lost-password/">Lost your password?</a>
  </div>
  <p class="error-msg">
  </p>
  <div class="form-group" id="wf-two-fa-container" style="display:none;">
    <label for="wfls-token">Wordfence 2FA Code</label>
    <input type="text" name="wfls-token" id="wfls-token" class="input form-control">
  </div>
  <div class="wf-login-submit">
    <input type="hidden" name="wfls-token-submit" id="wfls-token-submit" class="btn" value="Log In">
  </div>
  <script>
    window.onload = function() {
      let isUserLoggedIn = false;
      let loginUsernameElements = document.querySelectorAll('.login-username');
      let loginPasswordElements = document.querySelectorAll('.login-password');
      let loginRememberElements = document.querySelectorAll('.login-remember');
      let loginSubmitElements = document.querySelectorAll('.login-submit');
      let loginLostPassElements = document.querySelectorAll('.password-lost');
      let loginErrorMsgElements = document.querySelectorAll('.error-msg');
      let defaultLoginLink = document.querySelectorAll('.wpstg-default-login-link');
      let loginForm = document.getElementById("loginform");
      let loginUsername = document.getElementById("user_login");
      let loginPassword = document.getElementById("user_pass");
      let wfToken = document.getElementById("wfls-token");
      let loginSubmitButton = document.getElementById("wp-submit");
      let wfLoginSubmitButton = document.getElementById("wfls-token-submit");
      let wfTokenElement = document.getElementById("wf-two-fa-container");
      loginSubmitButton.type = "button";
      loginForm.action = "https://staging.seapax.se/wp-login.php";
      /*
       * the action wordfence_ls_authenticate checks if the user have 2fa enabled
       * returns two_factor_required = true if 2fa enabled
       * */
      function submitCustomLoginForm(event) {
        if ((event.key === 'Enter' && !isUserLoggedIn) || (event.type === 'click' && event.target === loginSubmitButton)) {
          const formData = new FormData();
          formData.append('log', loginUsername.value);
          formData.append('pwd', loginPassword.value);
          formData.append('redirect_to', 'https://staging.seapax.se');
          formData.append('action', 'wordfence_ls_authenticate');
          fetch("wp-admin/admin-ajax.php", {
            method: 'post',
            body: formData
          }).then((response) => response.json()).then((res) => {
            if (res.login === 1 && res.two_factor_required) {
              isUserLoggedIn = true;
              loginUsernameElements.forEach(element => {
                element.style.display = 'none';
              });
              defaultLoginLink.forEach(element => {
                element.style.display = 'none';
              });
              loginPasswordElements.forEach(element => {
                element.style.display = 'none';
              });
              loginRememberElements.forEach(element => {
                element.style.display = 'none';
              });
              loginSubmitElements.forEach(element => {
                element.style.display = 'none';
              });
              loginErrorMsgElements.forEach(element => {
                element.innerHTML = "";
                element.innerContent = "";
              });
              loginLostPassElements.forEach(element => {
                element.style.display = 'none';
                element.innerHTML = "";
                element.innerContent = "";
              });
              wfTokenElement.style.display = 'block';
              wfLoginSubmitButton.type = "button";
              loginSubmitButton.type = "hidden";
              loginUsername.name = "log";
              loginPassword.name = "pwd";
            } else if (res.login === 1 && !res.two_factor_required) {
              loginForm.action = "";
              loginForm.submit();
            } else {
              loginLostPassElements.forEach(element => {
                element.innerHTML = 'Cannot log in because WordFence 2FA authentication module is detected, but it does not work properly with the WP STAGING login form. Error message: ' + res.error +
                  ' <br><br>Try to log in with the <a href="./wp-login.php">default WordPress login</a> instead.';
              });
            }
          }).catch((error) => {});
        }
      }

      function wf2FAForm(event) {
        if (event.type === 'click' && event.target === wfLoginSubmitButton) {
          loginForm.submit();
        }
      }
      document.addEventListener('keydown', submitCustomLoginForm);
      loginSubmitButton.addEventListener('click', submitCustomLoginForm);
      wfLoginSubmitButton.addEventListener('click', wf2FAForm);
    };
  </script>
</form>

Text Content

Username or Email Address
Password
Remember Me
Login

If login is not possible, please use the default login form.

Lost your password?



Wordfence 2FA Code