提交 48fcab98 编写于 作者: J Jesse Glick

[JENKINS-47909] @daniel-beck asks about usernames containing valid $ escapes....

[JENKINS-47909] @daniel-beck asks about usernames containing valid $ escapes. Behavior is partly broken.
上级 5d2b8248
......@@ -823,6 +823,13 @@ public class UserTest {
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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册