Skip to content

Conversation

@BenEast
Copy link

@BenEast BenEast commented Jul 3, 2017

--[Issue #12] Fixed StringIndexOutOfBoundsException when given 'http://user:[email protected] host.com' as input string--

Updated url-detector.processColon to set length to 0 when readUserPass(length) is true.

All unit tests passed after this update.

--[Issue #16] Fixed StringIndexOutOfBoundsException when input string contains the substring "//:@."--

Updated conditional statements in url-detector.processColon() to clear the buffer if it has contents when readUserPass fails, and to set length to 0 otherwise.

This resolved Issue #16 regarding a StringIndexOutOfBoundsException being thrown when provided the input string "://VIVE MARINE LE PEN//:@.".

All unit tests still pass after this update.

Ben East added 3 commits July 3, 2017 15:57
…ption when input string contains the sub-string "//:@."
…ption when input string contains the sub-string "//:@."
…user:[email protected] host.com' as input string

Updated url-detector.processColon to set length to 0 when readUserPass(length) is true.
All unit tests passed after this update.
@BenEast BenEast changed the title [Issue #16] Fixed StringIndexOutOfBoundsException when input string contains the substring "//:@." Fixed [Issue #12] [Issue #16] Jul 3, 2017
@pgalbraith
Copy link

@tzuhanjan will this be included?

@cstroe
Copy link

cstroe commented Nov 3, 2018

This PR seems to be missing tests in TestUriDetection.java:

  @Test
  public void testTwoUrls() {
    runTest("http://user:[email protected] host.com", UrlDetectorOptions.Default, "http://user:[email protected]", "host.com");
  }

  @Test
  public void testSlashes() {
    runTest("://TEST//:@.", UrlDetectorOptions.Default);
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants