This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 1c1dbd872d Add proxy_user template check (#32334)
1c1dbd872d is described below

commit 1c1dbd872d5378856b4242961dcdf77c7f0dd712
Author: Jarek Potiuk <[email protected]>
AuthorDate: Tue Jul 4 13:48:59 2023 +0200

    Add proxy_user template check (#32334)
---
 airflow/providers/apache/hive/hooks/hive.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/airflow/providers/apache/hive/hooks/hive.py 
b/airflow/providers/apache/hive/hooks/hive.py
index 4ad3b9d12c..89fcda466f 100644
--- a/airflow/providers/apache/hive/hooks/hive.py
+++ b/airflow/providers/apache/hive/hooks/hive.py
@@ -152,6 +152,8 @@ class HiveCliHook(BaseHook):
                 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

Reply via email to