This is an automated email from the ASF dual-hosted git repository.
pierrejeambrun 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 9140ce5aee1 Percent-encode API client path params for keys with
slashes (#68667)
9140ce5aee1 is described below
commit 9140ce5aee1960094beb6e58f8d21cb13a6167ab
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Wed Jun 17 13:54:45 2026 +0200
Percent-encode API client path params for keys with slashes (#68667)
---
airflow-core/src/airflow/ui/src/queryClient.ts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/airflow-core/src/airflow/ui/src/queryClient.ts
b/airflow-core/src/airflow/ui/src/queryClient.ts
index e465402c308..48b47499046 100644
--- a/airflow-core/src/airflow/ui/src/queryClient.ts
+++ b/airflow-core/src/airflow/ui/src/queryClient.ts
@@ -29,6 +29,12 @@ if (OpenAPI.BASE.endsWith("/")) {
OpenAPI.BASE = OpenAPI.BASE.slice(0, -1);
}
+// Encode path params as full URI components so values containing "/" (e.g. a
variable key like
+// "/foo") become "%2Ffoo" rather than a literal "//", which proxies may
collapse. The generated
+// client otherwise defaults to encodeURI, which leaves "/" untouched.
+// The backend automatically decodes path params.
+OpenAPI.ENCODE_PATH = encodeURIComponent;
+
const RETRY_COUNT = 3;
const retryFunction = (failureCount: number, error: unknown) => {