Repository navigation
Fix non-proxy host suffix wildcard sanitization - #51347
Arnab Nandy (arnabnandy7) wants to merge 1 commit into
Conversation
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
|
The |
|
Thank you for your contribution Arnab Nandy (@arnabnandy7)! We will review the pull request and get back to you soon. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 33 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the proxy wildcard handling changes.
No open issues 🎉
What changed in this PR
Fixes #51341 by correcting non-proxy host suffix wildcard handling in azure-core and clientcore, preventing unintended hosts from bypassing the proxy.
Changes:
- Corrects suffix trimming, removes unreachable branches, and prevents an exception for
.*. - Adds regression tests across programmatic configuration, Java and SDK proxy properties, and
NO_PROXY. - Documents wildcard behavior with JavaDoc examples and changelog entries.
| File | Description |
|---|---|
sdk/core/azure-core/src/test/java/com/azure/core/http/ProxyOptionsTests.java |
Adds suffix wildcard regression tests across configuration sources. |
sdk/core/azure-core/src/main/java/com/azure/core/http/ProxyOptions.java |
Fixes suffix trimming and documents literal-dot behavior. |
sdk/core/azure-core/CHANGELOG.md |
Records the proxy bypass and exception fixes. |
sdk/clientcore/core/src/test/java/io/clientcore/core/http/models/ProxyOptionsTests.java |
Adds equivalent clientcore regression tests. |
sdk/clientcore/core/src/main/java/io/clientcore/core/http/models/ProxyOptions.java |
Applies the same sanitization fix and JavaDoc examples. |
sdk/clientcore/core/CHANGELOG.md |
Records the corresponding clientcore fixes. |
Review effort: Balanced
|
Hi Arnab Nandy (@arnabnandy7), thanks for the contribution and the continuous effort to make the Azure SDK for Java better :) I had already started to work on the reported issue and found few more edge cases than the ones covered in this PR, so I'll be closing it in favor of #51356 this time around. |
Description
Fixes #51341.
Corrects non-proxy host suffix wildcard sanitization in
azure-coreandclientcore. Previously, suffix trimming removed an extra literal character, allowing unintended hosts to bypass the proxy. For example,storage1*also matchedstorage2.example.com, and10.*matched100.64.0.1.The fix preserves literal characters, removes unreachable suffix branches, and prevents the
.*entry from throwing an exception. Adds JavaDoc examples, changelog entries, and regression tests covering programmatic configuration, Java proxy properties, SDK proxy properties, andNO_PROXY.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines