mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 09:53:30 +02:00
propertly encode
This commit is contained in:
parent
f7333e90d8
commit
5fe4f35139
1 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,9 @@
|
||||||
- (void) confirmCredentials:(NSString*)username :(NSString*)password {
|
- (void) confirmCredentials:(NSString*)username :(NSString*)password {
|
||||||
|
|
||||||
NSLog(@"web request started");
|
NSLog(@"web request started");
|
||||||
NSString *post = [NSString stringWithFormat:@"grant_type=password&username=%@&password=%@&scope=owner", username, [password stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet symbolCharacterSet]]];
|
NSString *post = [NSString stringWithFormat:@"grant_type=password&username=%@&password=%@&scope=owner",
|
||||||
|
[username stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet alphanumericCharacterSet]],
|
||||||
|
[password stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet alphanumericCharacterSet]]];
|
||||||
NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding];
|
NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
NSString *postLength = [NSString stringWithFormat:@"%ld", (unsigned long)[postData length]];
|
NSString *postLength = [NSString stringWithFormat:@"%ld", (unsigned long)[postData length]];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue