From 56bdbb49d705ea6d415aea55afe41e1d8b918f31 Mon Sep 17 00:00:00 2001 From: Kyle Matthew Hedden Date: Tue, 10 Nov 2020 13:28:15 -0500 Subject: [PATCH] remove KeySourceModel at openPage action level --- MVMCoreUI/OtherHandlers/MVMCoreUIActionHandler.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MVMCoreUI/OtherHandlers/MVMCoreUIActionHandler.m b/MVMCoreUI/OtherHandlers/MVMCoreUIActionHandler.m index ad19f862..80a932de 100644 --- a/MVMCoreUI/OtherHandlers/MVMCoreUIActionHandler.m +++ b/MVMCoreUI/OtherHandlers/MVMCoreUIActionHandler.m @@ -35,6 +35,16 @@ return NO; } +- (void)openPageAction:(NSDictionary *)actionInformation additionalData:(NSDictionary *)additionalData delegateObject:(DelegateObject *)delegateObject { + // Cleanup the source model data to prevent it from being accidentally auto-forwarded in openPage network requests by blind additionalData insertions. (https://onejira.verizon.com/browse/CXTDT-135642, https://onejira.verizon.com/browse/CXTDT-136001). + if (additionalData[KeySourceModel]) { + NSMutableDictionary *cleanedData = [additionalData mutableCopy]; + [cleanedData removeObjectForKey:KeySourceModel]; + additionalData = cleanedData; + } + [super openPageAction:actionInformation additionalData:additionalData delegateObject:delegateObject]; +} + - (void)popupAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject { // Perform a popup. NSString *pageTypeForPopup = [actionInformation stringForKey:KeyPageType];