Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 07E4F9A7C for ; Wed, 30 Nov 2011 12:46:07 +0000 (UTC) Received: (qmail 51417 invoked by uid 500); 30 Nov 2011 12:46:04 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 51394 invoked by uid 500); 30 Nov 2011 12:46:04 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 51366 invoked by uid 99); 30 Nov 2011 12:46:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 12:46:04 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,NORMAL_HTTP_TO_IP,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 12:46:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 6C9CDA8737 for ; Wed, 30 Nov 2011 12:45:40 +0000 (UTC) Date: Wed, 30 Nov 2011 12:45:40 +0000 (UTC) From: "STB Land (Updated) (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <518867529.25879.1322657140446.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1054307580.25868.1322656899890.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CB-96) [PGWhitelist processWhitelist] IP adresses handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CB-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] STB Land updated CB-96: ----------------------- Description: Theses tests fail with version 1.2.0 (not tested before) : {code:title=PGWhitelistTests.h|borderStyle=solid} @interface PGWhitelistTests : SenTestCase { } {code} {code:title=PGWhitelistTests.m|borderStyle=solid} #import "PGWhitelistTests.h" #import @implementation PGWhitelistTests - (void)setUp { [super setUp]; } - (void)tearDown { [super tearDown]; } - (void) testIpExactMatch { NSArray* allowedHosts = [NSArray arrayWithObjects: @"162.168.1.1", @"162.168.2.1", nil]; PGWhitelist* whitelist = [[PGWhitelist alloc] initWithArray:allowedHosts]; STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://mydomain.com"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.1.1"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.2.1"]], nil); STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.3.1"]], nil); [whitelist release]; } - (void) testIpWildcardMatch { NSArray* allowedHosts = [NSArray arrayWithObjects: @"162.168.1.*", @"162.168.2.*", nil]; PGWhitelist* whitelist = [[PGWhitelist alloc] initWithArray:allowedHosts]; STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://mydomain.com"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.1.1"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.1.2"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.2.1"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.2.2"]], nil); STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.3.1"]], nil); [whitelist release]; } @end {code} was: Theses tests fail with version 1.2.0 (not tested before) : @interface PGWhitelistTests : SenTestCase { } - (void) testIpExactMatch { NSArray* allowedHosts = [NSArray arrayWithObjects: @"162.168.1.1", @"162.168.2.1", nil]; PGWhitelist* whitelist = [[PGWhitelist alloc] initWithArray:allowedHosts]; STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://mydomain.com"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.1.1"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.2.1"]], nil); STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.3.1"]], nil); [whitelist release]; } - (void) testIpWildcardMatch { NSArray* allowedHosts = [NSArray arrayWithObjects: @"162.168.1.*", @"162.168.2.*", nil]; PGWhitelist* whitelist = [[PGWhitelist alloc] initWithArray:allowedHosts]; STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://mydomain.com"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.1.1"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.1.2"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.2.1"]], nil); STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.2.2"]], nil); STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.3.1"]], nil); [whitelist release]; } @end > [PGWhitelist processWhitelist] IP adresses handling > --------------------------------------------------- > > Key: CB-96 > URL: https://issues.apache.org/jira/browse/CB-96 > Project: Apache Callback > Issue Type: Bug > Components: iOS > Environment: Xcode 4 > Reporter: STB Land > Assignee: Shazron Abdullah > Labels: objective-c, phonegap, regex, wildcard > Original Estimate: 4h > Remaining Estimate: 4h > > Theses tests fail with version 1.2.0 (not tested before) : > {code:title=PGWhitelistTests.h|borderStyle=solid} > @interface PGWhitelistTests : SenTestCase { > } > {code} > {code:title=PGWhitelistTests.m|borderStyle=solid} > #import "PGWhitelistTests.h" > #import > @implementation PGWhitelistTests > - (void)setUp > { > [super setUp]; > } > - (void)tearDown > { > [super tearDown]; > } > - (void) testIpExactMatch > { > NSArray* allowedHosts = [NSArray arrayWithObjects: > @"162.168.1.1", > @"162.168.2.1", > nil]; > PGWhitelist* whitelist = [[PGWhitelist alloc] initWithArray:allowedHosts]; > STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://mydomain.com"]], nil); > STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.1.1"]], nil); > STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.2.1"]], nil); > STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.3.1"]], nil); > [whitelist release]; > } > - (void) testIpWildcardMatch > { > NSArray* allowedHosts = [NSArray arrayWithObjects: > @"162.168.1.*", > @"162.168.2.*", > nil]; > PGWhitelist* whitelist = [[PGWhitelist alloc] initWithArray:allowedHosts]; > STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://mydomain.com"]], nil); > STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.1.1"]], nil); > STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.1.2"]], nil); > STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.2.1"]], nil); > STAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.2.2"]], nil); > STAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://192.168.3.1"]], nil); > [whitelist release]; > } > @end > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira