Skip to content

Commit

Permalink
[2.7.3]
Browse files Browse the repository at this point in the history
На экране авторизации теперь можно переходить только по ссылкам для
смены языка, ни на какие другие страницы доступа нет.
  • Loading branch information
AndrewShmig committed Aug 9, 2013
1 parent 8391d2d commit 5403c4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Project/Project/ASAAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
#import "ASAViewController.h"
#import "VKAccessToken.h"
#import "VKUser.h"
#import "VKStorageItem.h"
#import "VKStorage.h"



static NSString *const kVKAppID = @"3541027";
static NSString *const kVKPermissionsArray = @"photos,friends,wall,audio,video,docs,notes,pages,status,groups,messages";


@implementation ASAAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
Expand Down
8 changes: 7 additions & 1 deletion Project/Vkontakte-iOS-SDK-v2.0/VKConnector/VKConnector.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ - (void)startWithAppID:(NSString *)appID
@"redirect_uri" : _redirectURL,
@"scope" : _settings,
@"response_type" : @"token",
@"display" : @"touch"};
@"display" : @"mobile"};
NSMutableString *urlAsString = [[NSMutableString alloc] init];
NSMutableArray *urlParams = [[NSMutableArray alloc] init];

Expand Down Expand Up @@ -182,6 +182,12 @@ - (BOOL) webView:(UIWebView *)webView
[[KGModal sharedInstance] hideAnimated:YES];
}

// разрешаем пользователю только сменить язык в окне авторизации, ничего более
if([url hasPrefix:@"https://vk.com"] || [url hasPrefix:@"http://vk.com"] ||
([url hasPrefix:@"https://m.vk.com"] && ![url hasPrefix:@"https://m.vk.com/settings"])){
return NO;
}

return YES;
}

Expand Down

0 comments on commit 5403c4d

Please sign in to comment.