Skip to content

Commit

Permalink
Add proxy_user template check (#32334)
Browse files Browse the repository at this point in the history
  • Loading branch information
potiuk authored Jul 4, 2023
1 parent 7022098 commit 1c1dbd8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions airflow/providers/apache/hive/hooks/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ def _prepare_cli_cmd(self) -> list[Any]:
proxy_user = self._get_proxy_user()
if ";" in template:
raise RuntimeError("The principal should not contain the ';' character")
if ";" in proxy_user:
raise RuntimeError("The proxy_user should not contain the ';' character")
jdbc_url += f";principal={template};{proxy_user}"
elif self.auth:
jdbc_url += ";auth=" + self.auth
Expand Down

0 comments on commit 1c1dbd8

Please sign in to comment.