#1028 validate region string format before use in URL construction - #1051
Open
gterminator wants to merge 2 commits into
Open
#1028 validate region string format before use in URL construction#1051gterminator wants to merge 2 commits into
gterminator wants to merge 2 commits into
Conversation
Contributor
Author
|
@Avery-Dunn @bgavrilMS need a review. |
gterminator
marked this pull request as draft
July 31, 2026 04:07
gterminator
marked this pull request as ready for review
July 31, 2026 04:07
bgavrilMS
reviewed
Aug 3, 2026
bgavrilMS
reviewed
Aug 3, 2026
gterminator
added a commit
to gterminator/microsoft-authentication-library-for-java
that referenced
this pull request
Aug 3, 2026
Auto-detected regions (REGION_NAME env var, IMDS) that fail the naming convention check now log a warning and fall back to the global endpoint like any other failed autodetection, instead of throwing and aborting the request. Developer-supplied regions still fail fast, but now at Builder.azureRegion(val) instead of at first token request, so getRegionalizedHost no longer needs to re-validate on every lookup.
…gion Region format is now validated at Builder.azureRegion(val), failing fast for a developer-supplied region instead of at first token request. Auto-detected regions (REGION_NAME env var, IMDS) that fail the naming convention check now log a warning and fall back to the global endpoint like any other failed autodetection, instead of throwing and aborting the request. getRegionalizedHost no longer re-validates the region on every lookup, since it is now guaranteed valid by the time it is used.
gterminator
force-pushed
the
feature/issue-1028_validate_region_format
branch
from
August 3, 2026 22:34
ad9ed3a to
839e367
Compare
Contributor
Author
|
@bgavrilMS done. May we can (in the future) think about how the discovery is failed. Don't like that we returning null as a business logic. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this should fix #1028