`AFHTTPSessionManager` now copies its `securityPolicy` by kcharwood · Pull Request #2887 · AFNetworking/AFNetworking · GitHub
Skip to content
This repository was archived by the owner on Jan 17, 2023. It is now read-only.

AFHTTPSessionManager now copies its securityPolicy#2887

Merged
kcharwood merged 2 commits into
masterfrom
security/2887
Oct 21, 2015
Merged

AFHTTPSessionManager now copies its securityPolicy#2887
kcharwood merged 2 commits into
masterfrom
security/2887

Conversation

@kcharwood

Copy link
Copy Markdown
Contributor

When I tried to copy the AFHTTPSessionManager the securityPolicy doesn't get copied with it.

@hardikdevios

Copy link
Copy Markdown

@mohamede1945

Copy link
Copy Markdown
Author

Yes

@hardikdevios

Copy link
Copy Markdown

@mohamede1945 so when you do copy it reverted back to the AFSSLPinningModeNone, right ?

@mohamede1945

Copy link
Copy Markdown
Author

Please, look at the copy method code, it's obvious that the property is not copied.

@hardikdevios

Copy link
Copy Markdown

@mohamede1945 yes i know the method doesn't have that copy with zone because AFSecurityPolicy doesn't confirm the NSCopying protocol.

@kcharwood

Copy link
Copy Markdown
Contributor

@mohamede1945 Would you be willing to create a patch? Thanks! 🍻

@mohamede1945

Copy link
Copy Markdown
Author

@kcharwood Yeah sure, I'll do it over the weekend.

@kcharwood kcharwood added this to the 2.6.2 milestone Oct 19, 2015
@kcharwood

Copy link
Copy Markdown
Contributor

cc @cnoon @kylef @jshier for a sanity check here.

Also updated AFHTTPSessionManager and AFHTTPRequestManager to use the copying/encoding/decoding features for the security policy as well.

This will need to go into 3.0.0 as well.

Comment thread AFNetworking/AFSecurityPolicy.m Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you change this id to instancetype please.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Doh! Updated.

@kylef

kylef commented Oct 19, 2015

Copy link
Copy Markdown
Contributor

👍 from me.

kcharwood added a commit that referenced this pull request Oct 21, 2015
AFHTTPSessionManager copying securityPolicy not getting copied
@kcharwood kcharwood merged commit c94299a into master Oct 21, 2015
@kcharwood kcharwood modified the milestones: 2.7.0, 2.6.2 Oct 21, 2015
@kcharwood

Copy link
Copy Markdown
Contributor

@kcharwood kcharwood deleted the security/2887 branch October 21, 2015 13:17
@kcharwood kcharwood changed the title AFHTTPSessionManager copying securityPolicy not getting copied AFHTTPSessionManager now copies its securityPolicy Nov 3, 2015
@kcharwood kcharwood added the added label Nov 3, 2015
sergiou87 pushed a commit to plexinc/afnetworking that referenced this pull request Dec 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants