Skip to content

Commit 79b40f9

Browse files
committed
refactor(adfs_credentials_provider): explicitly specify lxml as parser for server response
1 parent 10fcf32 commit 79b40f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

redshift_connector/plugin/adfs_credentials_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def form_based_authentication(self: "AdfsCredentialsProvider") -> str:
4949
raise InterfaceError(e)
5050

5151
try:
52-
soup = bs4.BeautifulSoup(response.text)
52+
soup = bs4.BeautifulSoup(response.text, features="lxml")
5353
except Exception as e:
5454
_logger.error("An error occurred while parsing response: {}".format(str(e)))
5555
raise InterfaceError(e)
@@ -89,7 +89,7 @@ def form_based_authentication(self: "AdfsCredentialsProvider") -> str:
8989
raise InterfaceError(e)
9090

9191
try:
92-
soup = bs4.BeautifulSoup(response.text)
92+
soup = bs4.BeautifulSoup(response.text, features="lxml")
9393
except Exception as e:
9494
_logger.error("An error occurred while parsing response: {}".format(str(e)))
9595
raise InterfaceError(e)

0 commit comments

Comments
 (0)