Skip to content
Permalink
Browse files
[JENKINS-47909] @daniel-beck asks about usernames containing valid $ …
…escapes. Behavior is partly broken.
  • Loading branch information
jglick committed Nov 9, 2017
1 parent 5d2b824 commit 48fcab9862e002546a2001ffa5a4584d93e5c831
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
@@ -823,6 +823,13 @@ public void shellyUsernameMigrated() {
assertFalse(new File(rootDir, "bla$phem.us").exists());
assertTrue(user.getConfigFile().getFile().exists());
assertThat(user.getFullName(), equalTo("Weird Username"));
user = User.getById("make\u1000000", false);
assertNotNull("we do not prevent accesses to the phony name, alas", user);
user = User.getById("make$1000000", false);
assertCorrectConfig(user, "users/make$00241000000/config.xml");
assertFalse(new File(rootDir, "make$1000000").exists());
assertTrue("but asking for the real name triggers migration", user.getConfigFile().getFile().exists());
assertThat(user.getFullName(), equalTo("Greedy Fella"));
}

private static void assertCorrectConfig(User user, String unixPath) {
Binary file not shown.

0 comments on commit 48fcab9

Please sign in to comment.