Permalink
Browse files

Using HTTPS since we're dealing with passwords.

  • Loading branch information...
Igor Sutton
Igor Sutton committed Sep 8, 2010
1 parent 383a4f2 commit 0d912856780e17413d06cd92451507db00fb93c0
Showing with 4 additions and 4 deletions.
  1. +4 −4 TKTumblr.m
View
@@ -94,10 +94,10 @@ - (BOOL)uploadPost:(TKPost *)thePost withDomain:(NSString *)theDomain
[postDict setObject:theDomain forKey:@"group"];
[postDict addEntriesFromDictionary:[thePost attributesAsDictionary]];
-
+
NSString *postString = [postDict multipartMIMEString];
- NSMutableURLRequest *theURLRequest = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://www.tumblr.com/api/write"]];
-
+ NSMutableURLRequest *theURLRequest = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://www.tumblr.com/api/write"]];
+
[theURLRequest setHTTPMethod:@"POST"];
[theURLRequest setValue:@"8bit" forHTTPHeaderField:@"Content-Transfer-Encoding"];
[theURLRequest setValue:[NSString stringWithFormat:@"%d", [postString length]] forHTTPHeaderField:@"Content-Length"];
@@ -149,7 +149,7 @@ - (NSDictionary *)attributesAsDictionary
- (NSArray *)tumblelogs
{
- NSString *theURLString = [NSString stringWithFormat:@"http://www.tumblr.com/api/authenticate?email=%@&password=%@",
+ NSString *theURLString = [NSString stringWithFormat:@"https://www.tumblr.com/api/authenticate?email=%@&password=%@",
[email stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
[password stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSURL *theURL = [NSURL URLWithString:theURLString];

0 comments on commit 0d91285

Please sign in to comment.