-
Notifications
You must be signed in to change notification settings - Fork 541
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #2254 - Apply whitelist host protection to ProxyServlet
- Loading branch information
Showing
13 changed files
with
196 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| package io.hawt.util; | ||
|
|
||
| import java.util.Arrays; | ||
|
|
||
| import org.junit.Test; | ||
|
|
||
| import static org.hamcrest.CoreMatchers.is; | ||
| import static org.junit.Assert.assertThat; | ||
| import static org.junit.Assert.fail; | ||
|
|
||
| public class StringsTest { | ||
|
|
||
| @Test | ||
| public void split() { | ||
| assertThat(Strings.split("abc", ","), is(Arrays.asList("abc"))); | ||
| assertThat(Strings.split("a,b,c", ","), is(Arrays.asList("a", "b", "c"))); | ||
| assertThat(Strings.split("a, b, c", ","), is(Arrays.asList("a", "b", "c"))); | ||
| assertThat(Strings.split(",a,,b,,c,", ","), is(Arrays.asList("a", "b", "c"))); | ||
| try { | ||
| Strings.split(null, ","); | ||
| fail(); | ||
| } catch (IllegalArgumentException e) { | ||
| // success | ||
| } | ||
| try { | ||
| Strings.split("a, b, c", null); | ||
| fail(); | ||
| } catch (IllegalArgumentException e) { | ||
| // success | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.