Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .textlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

### ⚠ BREAKING CHANGES

* **py37:**
- **py37:**

### Build System

* **py37:** remove support for python3.7 ([a1a0a9e](https://github.com/cshamrick/stsauth/commit/a1a0a9ec0c86be7ceae49f11983c3b0646793451))
- **py37:** remove support for python3.7 ([a1a0a9e](https://github.com/cshamrick/stsauth/commit/a1a0a9ec0c86be7ceae49f11983c3b0646793451))

## [1.1.1](https://github.com/cshamrick/stsauth/compare/v1.1.0...v1.1.1) (2024-09-20)

Expand Down
7 changes: 5 additions & 2 deletions sts_auth/stsauth.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import re
import sys
from datetime import datetime
from typing import Optional, Mapping
from urllib.parse import urlparse, urlunparse

Expand Down Expand Up @@ -128,7 +127,7 @@ def generate_payload_from_login_page(self, response: requests.Response) -> Mappi
login_page = BeautifulSoup(response.text, "html.parser")
payload = {}

for input_tag in login_page.find_all(re.compile("(INPUT|input)")):
for input_tag in login_page.find(id="loginForm").find_all(re.compile("(INPUT|input)")):
name = input_tag.get("name", "")
value = input_tag.get("value", "")
logger.debug("Adding value for {!r} to Login Form payload.".format(name))
Expand Down Expand Up @@ -192,6 +191,10 @@ def authenticate_to_adfs_portal(self, response: requests.Response) -> requests.R
error_msg = login_error_message if login_error_message else vip_login_error_message
click.secho(error_msg.string, fg="red") # type: ignore[union-attr]
sys.exit(1)
if not login_response.ok:
click.secho("Login page failed", fg="red")
logger.debug("Login Response: {}".format(login_response.text))
sys.exit(1)
return login_response

def fetch_aws_account_names(self, response: requests.Response) -> Optional[requests.Response]:
Expand Down
1 change: 1 addition & 0 deletions super-linter.env
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ VALIDATE_GITHUB_ACTIONS_ZIZMOR=false
FIX_YAML_PRETTIER=true
FIX_MARKDOWN_PRETTIER=true
FIX_PYTHON_BLACK=true
FIX_NATURAL_LANGUAGE=true

# Tool-specific configuration
TRIVY_IGNOREFILE=.trivyignore.yaml