Skip to content

Commit c38402f

Browse files
authored
Merge pull request #2693 from AzureAD/release/2.4.0
release 2.4.0
2 parents ef78596 + cb54673 commit c38402f

File tree

12 files changed

+59
-14
lines changed

12 files changed

+59
-14
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [2.4.0]
2+
* Prevent double conversion of MSALInternal error #2688
3+
14
## [2.3.0]
25
* Fix automation tests (#2673)
36

MSAL.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "MSAL"
3-
s.version = "2.3.0"
3+
s.version = "2.4.0"
44
s.summary = "Microsoft Authentication Library (MSAL) for iOS"
55
s.description = <<-DESC
66
The MSAL library for iOS gives your app the ability to begin using the Microsoft Cloud by supporting Microsoft Azure Active Directory and Microsoft Accounts in a converged experience using industry standard OAuth2 and OpenID Connect. The library also supports Microsoft Azure B2C for those using our hosted identity management service.

MSAL/IdentityCore

MSAL/resources/ios/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.3.0</string>
18+
<string>2.4.0</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

MSAL/resources/mac/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.3.0</string>
18+
<string>2.4.0</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSHumanReadableCopyright</key>

MSAL/src/MSALErrorConverter.m

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,18 @@ + (NSError *)errorWithDomain:(NSString *)domain
238238
else if ([domain isEqualToString:MSALErrorDomain])
239239
{
240240
mappedCode = @(code);
241+
internalCode = userInfo[MSALInternalErrorCodeKey];
241242
}
242243

243244
if (shouldClassifyErrors && mappedCode != nil && ![s_recoverableErrorCode containsObject:mappedCode])
244245
{
245-
// If mapped code is MSALErrorInternal, set internalCode to MSALInternalErrorUnexpected
246-
// to avoid the case when both mapped and internal code are MSALErrorInternal.
247-
internalCode = [mappedCode isEqual:@(MSALErrorInternal)] ? @(MSALInternalErrorUnexpected) : mappedCode;
246+
if (!internalCode)
247+
{
248+
// If mapped code is MSALErrorInternal, set internalCode to MSALInternalErrorUnexpected
249+
// to avoid the case when both mapped and internal code are MSALErrorInternal.
250+
internalCode = [mappedCode isEqual:@(MSALErrorInternal)] ? @(MSALInternalErrorUnexpected) : mappedCode;
251+
}
252+
248253
mappedCode = @(MSALErrorInternal);
249254
}
250255

MSAL/src/MSAL_Internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
//------------------------------------------------------------------------------
2727

2828
#define MSAL_VER_HIGH 2
29-
#define MSAL_VER_LOW 3
29+
#define MSAL_VER_LOW 4
3030
#define MSAL_VER_PATCH 0
3131

3232
#define STR_HELPER(x) #x

MSAL/test/automation/tests/MSALBaseUITest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ - (void)closeAuthUIUsingWebViewType:(MSIDWebviewType)webViewType
239239
// We take the first one and force tap it, for some reason tap doesn't work
240240
XCUIElement *firstButton = [elementQuery elementBoundByIndex:0];
241241

242-
__auto_type coordinate = [firstButton coordinateWithNormalizedOffset:CGVectorMake(0, 0)];
242+
__auto_type coordinate = [firstButton coordinateWithNormalizedOffset:CGVectorMake(1, 1)];
243243
[coordinate tap];
244244
}
245245
else

MSAL/test/automation/tests/interactive/MSALADFSv4FederatedTests.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ - (void)setUp
5858

5959
#pragma mark - Tests
6060

61+
#ifdef FEDERATION_TESTS_ENABLED
6162
- (void)testInteractiveADFSv4Login_withPromptAlways_noLoginHint_andSystemWebView
6263
{
6364
MSIDAutomationTestRequest *request = [self.class.confProvider defaultAppRequest:self.testEnvironment targetTenantId:self.primaryAccount.targetTenantId];
@@ -107,5 +108,6 @@ - (void)testInteractiveADFSv4Login_withPromptAlways_withLoginHint_andEmbeddedWeb
107108
NSString *homeAccountId = [self runSharedADFSInteractiveLoginWithRequest:request];
108109
XCTAssertNotNil(homeAccountId);
109110
}
111+
#endif // FEDERATION_TESTS_ENABLED
110112

111113
@end

MSAL/test/automation/tests/interactive/MSALGuestUserTests.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ - (void)setUp
5757
[self loadTestAccount:accountConfigurationRequest];
5858
}
5959

60+
#ifdef FEDERATION_TESTS_ENABLED
6061
// #347620
6162
- (void)testInteractiveAndSilentAADLogin_withNonConvergedApp_withPromptAlways_noLoginHint_SystemWebView_signinIntoGuestTenantFirst
6263
{
@@ -160,6 +161,7 @@ - (void)testInteractiveAndSilentAADLogin_withConvergedApp_withPromptAlways_noLog
160161
homeRequest.homeAccountIdentifier = homeAccountId;
161162
[self runSharedSilentAADLoginWithTestRequest:homeRequest];
162163
}
164+
#endif // FEDERATION_TESTS_ENABLED
163165

164166
- (NSString *)runSharedGuestInteractiveLoginWithRequest:(MSIDAutomationTestRequest *)request
165167
closeResultView:(BOOL)closeResultView

0 commit comments

Comments
 (0)