pierrejeambrun opened a new pull request, #68667: URL: https://github.com/apache/airflow/pull/68667
Variable keys may start with or contain `/` (e.g. `/foo`). The generated UI API client interpolated path params with `encodeURI`, which intentionally leaves `/` unescaped — so a key `/foo` produced a literal `//` in the URL (`/api/v2/variables//foo`). Some proxies collapse `//` → `/`, silently dropping the slash and corrupting the key, so GET/PATCH/DELETE of such variables fail behind those proxies (create is unaffected, since the key travels in the request body). Switching `OpenAPI.ENCODE_PATH` to `encodeURIComponent` escapes `/` as `%2F`, so no literal `//` ever appears; the backend decodes it back to `/`. It's a no-op for plain keys, and also correctly escapes other characters (`?`, `#`, `&`, …) that `encodeURI` wrongly left untouched in path-param values. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.8) Generated-by: Claude Code (Opus 4.8) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
