Skip to content

Commit

Permalink
Merge pull request #1420 from AzureAD/oldalton/merge_2.7.12_into_master
Browse files Browse the repository at this point in the history
Merge 2.7.12 into master
  • Loading branch information
oldalton authored May 31, 2019
2 parents d643d3d + 3810bcf commit e1ee121
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ADAL.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "ADAL"
s.module_name = "ADAL"
s.version = "2.7.11"
s.version = "2.7.12"
s.summary = "The ADAL SDK for iOS gives you the ability to add Azure Identity authentication to your application"

s.description = <<-DESC
Expand Down
4 changes: 4 additions & 0 deletions ADAL/ADAL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4234,6 +4234,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = D6CF4EB01FC370BF00CD70C5 /* adal__framework__ios.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = "";
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
};
Expand All @@ -4243,6 +4245,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = D6CF4EB01FC370BF00CD70C5 /* adal__framework__ios.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = "";
GCC_PREPROCESSOR_DEFINITIONS = "";
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion ADAL/IdentityCore
Submodule IdentityCore updated 28 files
+10 −0 IdentityCore/IdentityCore.xcodeproj/project.pbxproj
+2 −3 IdentityCore/src/cache/serializers/MSIDJsonSerializer.m
+12 −12 IdentityCore/src/cache/token/MSIDAccountCacheItem.m
+12 −12 IdentityCore/src/cache/token/MSIDCredentialCacheItem.m
+1 −1 IdentityCore/src/oauth2/aad_v1/MSIDAADV1IdTokenClaims.m
+1 −1 IdentityCore/src/oauth2/aad_v2/MSIDAADV2IdTokenClaims.m
+3 −2 IdentityCore/src/telemetry/MSIDTelemetryHttpEvent.m
+2 −3 IdentityCore/src/util/MSIDJsonObject.m
+0 −3 IdentityCore/src/util/NSData+MSIDExtensions.h
+0 −5 IdentityCore/src/util/NSData+MSIDExtensions.m
+3 −3 IdentityCore/src/util/NSDictionary+MSIDExtensions.h
+50 −18 IdentityCore/src/util/NSDictionary+MSIDExtensions.m
+32 −0 IdentityCore/src/util/NSJSONSerialization+MSIDExtensions.h
+43 −0 IdentityCore/src/util/NSJSONSerialization+MSIDExtensions.m
+3 −3 IdentityCore/src/webview/embeddedWebview/challangeHandlers/MSIDClientTLSHandler.m
+1 −8 IdentityCore/src/webview/embeddedWebview/challangeHandlers/MSIDPKeyAuthHandler.m
+1 −6 IdentityCore/src/webview/response/MSIDWebOAuth2Response.m
+2 −0 IdentityCore/src/webview/response/MSIDWebviewResponse.h
+20 −8 IdentityCore/src/webview/response/MSIDWebviewResponse.m
+1 −2 IdentityCore/src/workplacejoin/MSIDPkeyAuthHelper.h
+15 −41 IdentityCore/src/workplacejoin/MSIDPkeyAuthHelper.m
+1 −1 IdentityCore/src/workplacejoin/MSIDWorkPlaceJoinUtil.h
+62 −97 IdentityCore/src/workplacejoin/ios/MSIDWorkPlaceJoinUtil.m
+80 −204 IdentityCore/src/workplacejoin/mac/MSIDWorkPlaceJoinUtil.m
+26 −0 IdentityCore/tests/MSIDCredentialCacheItemTests.m
+38 −7 IdentityCore/tests/MSIDDictionaryExtensionsTests.m
+61 −0 IdentityCore/tests/MSIDWebAADAuthResponseTests.m
+3 −0 changelog.txt
2 changes: 1 addition & 1 deletion ADAL/resources/ios/Framework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.7.11</string>
<string>2.7.12</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion ADAL/src/ADAL_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// through build script. Don't change its format unless changing build script as well.)
#define ADAL_VER_HIGH 2
#define ADAL_VER_LOW 7
#define ADAL_VER_PATCH 11
#define ADAL_VER_PATCH 12

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
Expand Down
10 changes: 5 additions & 5 deletions ADAL/src/ADAuthenticationContext+Internal.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ + (ADAuthenticationError*)errorFromDictionary:(NSDictionary*)dictionary
errorCode:(ADErrorCode)errorCode
{
//First check for explicit OAuth2 protocol error:
NSString *serverOAuth2Error = [dictionary msidStringForKey:MSID_OAUTH2_ERROR];
NSString *serverOAuth2Error = [dictionary msidStringObjectForKey:MSID_OAUTH2_ERROR];
if (serverOAuth2Error)
{
NSString *responseCorrelationId = [dictionary msidStringForKey:MSID_OAUTH2_CORRELATION_ID_RESPONSE];
NSString *responseCorrelationId = [dictionary msidStringObjectForKey:MSID_OAUTH2_CORRELATION_ID_RESPONSE];
NSUUID *correlationId = responseCorrelationId ? [[NSUUID alloc] initWithUUIDString:responseCorrelationId] : nil;

ADErrorCode code = errorCode;
NSString *suberror = [dictionary msidStringForKey:ADAL_AUTH_SUBERROR];
NSString *suberror = [dictionary msidStringObjectForKey:ADAL_AUTH_SUBERROR];
NSMutableDictionary *userInfo = [NSMutableDictionary new];
userInfo[ADSuberrorKey] = suberror;

Expand All @@ -72,8 +72,8 @@ + (ADAuthenticationError*)errorFromDictionary:(NSDictionary*)dictionary
code = AD_ERROR_SERVER_PROTECTION_POLICY_REQUIRED;
}

userInfo[ADUserIdKey] = [dictionary msidStringForKey:ADAL_AUTH_ADDITIONAL_USER_IDENTIFIER];
NSString *errorDescription = [dictionary msidStringForKey:MSID_OAUTH2_ERROR_DESCRIPTION];
userInfo[ADUserIdKey] = [dictionary msidStringObjectForKey:ADAL_AUTH_ADDITIONAL_USER_IDENTIFIER];
NSString *errorDescription = [dictionary msidStringObjectForKey:MSID_OAUTH2_ERROR_DESCRIPTION];

return [ADAuthenticationError OAuthServerError:serverOAuth2Error
description:errorDescription
Expand Down
6 changes: 3 additions & 3 deletions ADAL/src/ADAuthenticationResult+Internal.m
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ + (ADAuthenticationResult *)resultForBrokerErrorResponse:(NSDictionary *)respons
errorDetails = @"Broker did not provide any details";
}

userInfo[ADBrokerVersionKey] = [response msidStringForKey:ADAL_BROKER_APP_VERSION];
userInfo[ADBrokerVersionKey] = [response msidStringObjectForKey:ADAL_BROKER_APP_VERSION];

NSString *strErrorCode = [response valueForKey:@"error_code"];
NSInteger errorCode = AD_ERROR_TOKENBROKER_UNKNOWN;
Expand All @@ -191,8 +191,8 @@ + (ADAuthenticationResult *)resultForBrokerErrorResponse:(NSDictionary *)respons
errorCode = [strErrorCode integerValue];
}

userInfo[ADSuberrorKey] = [response msidStringForKey:ADAL_AUTH_SUBERROR];
userInfo[ADUserIdKey] = [response msidStringForKey:@"user_id"];
userInfo[ADSuberrorKey] = [response msidStringObjectForKey:ADAL_AUTH_SUBERROR];
userInfo[ADUserIdKey] = [response msidStringObjectForKey:@"user_id"];

NSString *protocolCode = [response valueForKey:@"protocol_code"];
if (!protocolCode)
Expand Down
4 changes: 2 additions & 2 deletions ADAL/src/request/ADAuthenticationRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ - (BOOL)setClaims:(NSString *)claims error:(ADAuthenticationError **)error

NSData *decodedData = [_claims.msidWWWFormURLDecode dataUsingEncoding:NSUTF8StringEncoding];
NSError *jsonError = nil;
NSDictionary *decodedDictionary = [NSDictionary msidDictionaryFromJsonData:decodedData error:&jsonError];
NSDictionary *decodedDictionary = [NSJSONSerialization JSONObjectWithData:decodedData options:0 error:&jsonError];

if (!decodedDictionary)
if (!decodedDictionary || ![decodedDictionary isKindOfClass:[NSDictionary class]])
{
if (error)
{
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 2.7.12 (05.30.2019)
----------
* Make cache more resilient to corrupt data with nulls (#1419)

Version 2.7.11 (05.14.2019)
-----------
* Fix issues when ADAL was trying to handle MSAL broker responses.
Expand Down

0 comments on commit e1ee121

Please sign in to comment.