Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-25744] iOS: Fix http post data leak #43

Merged
merged 3 commits into from May 4, 2018

Conversation

hansemannn
Copy link
Contributor

@hansemannn
Copy link
Contributor Author

@vijaysingh-axway We likely need to do the same for your NSURLSession change.

@hansemannn
Copy link
Contributor Author

@vijaysingh-axway Ping on the review!

Copy link
Contributor

@vijaysingh-axway vijaysingh-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create PR for titanium_moble with updated library also. Thanks!

@@ -413,6 +413,8 @@ - (void)responseFinished
[self invokeCallbackWithState:APSHTTPCallbackStateDataStream];

[self invokeCallbackWithState:APSHTTPCallbackStateLoad];

[[self postForm] destroyTemporaryData];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be added in error block of
"- (void)URLSession:(nonnull NSURLSession *)session task:(nonnull NSURLSessionTask *)task didCompleteWithError:(nullable NSError *)error".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhh, it is already. But it should also be here to be used on successful POST requests. Or do you have objections there?

Copy link
Contributor

@vijaysingh-axway vijaysingh-axway Mar 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine here. But in following section also it should be there. Reason is function get return from error block, if error happens.

- (void)URLSession:(nonnull NSURLSession *)session task:(nonnull NSURLSessionTask *)task didCompleteWithError:(nullable NSError *)error
 {
   if (error != NULL) {
     DebugLog(@"%s", __PRETTY_FUNCTION__);
     self.response.readyState = APSHTTPResponseStateDone;
     [self invokeCallbackWithState:APSHTTPCallbackStateReadyState];
 
     self.response.connected = NO;
     self.response.error = error;
     [self invokeCallbackWithState:APSHTTPCallbackStateError];
     return;
   }

@hansemannn
Copy link
Contributor Author

@vijaysingh-axway PR updated

Copy link
Contributor

@vijaysingh-axway vijaysingh-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR passed

@hansemannn hansemannn merged commit 840c29f into tidev:master May 4, 2018
@hansemannn hansemannn deleted the TIMOB-25744 branch December 14, 2021 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants