[minor][bugfix]: Remove CBA URL-string fallback (MSRC-42fca33e)#1829
[minor][bugfix]: Remove CBA URL-string fallback (MSRC-42fca33e)#1829agubuzomaximus wants to merge 1 commit into
Conversation
| @@ -46,16 +46,12 @@ + (BOOL)handleChallenge:(NSURLAuthenticationChallenge *)challenge | |||
| SecIdentityRef identity = NULL; | |||
There was a problem hiding this comment.
This pull request does not update changelog.txt.
Please consider if this change would be noticeable to a partner or user and either update changelog.txt or resolve this conversation.
There was a problem hiding this comment.
Pull request overview
This PR addresses a security vulnerability (MSRC-42fca33e) by removing the URL-string fallback in MSIDCertAuthHandler that previously called SecIdentityCopyPreferred with webview.URL.absoluteString when the host-based lookup failed. That fallback enabled an origin-confusion attack vector where a webview URL host could be different from the protection space host. The PR also adds a unit test file with five tests covering the new behavior.
Changes:
- Remove the URL-string fallback call to
SecIdentityCopyPreferredinMSIDCertAuthHandler.m, so only the host-based lookup is used. - Add inline comments explaining the rationale for the removal.
- Add
MSIDCertAuthHandlerTests.mwith five tests covering preferred identity lookup, fallback to user prompt, and certauth subdomain handling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| IdentityCore/src/webview/embeddedWebview/challangeHandlers/mac/MSIDCertAuthHandler.m | Removes URL-based SecIdentityCopyPreferred fallback; adds explanatory comment. |
| IdentityCore/tests/mac/MSIDCertAuthHandlerTests.m | New test file validating the host-only lookup behavior, prompt fallback, and certauth subdomain flow. |
PR Checklist (must be completed before review)
PR Title Format
Required Format:
[Keyword1] [Keyword2]: Descriptionmajor,minor, orpatch(case-insensitive)feature,bugfix,engg, ortests(case-insensitive)Examples:
[MAJOR] [Feature]: new API[minor] [bugfix]: fix crash[PATCH][tests]:add coverageProposed changes
Describe what this PR is trying to do.
Type of change
Risk
Additional information