From 7e5ee5a454ec396b5dc2f00e89adeca84d6ef683 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Mon, 18 Jul 2011 18:10:34 -0400 Subject: [PATCH] Allow specification of forward-slash character in urls (issue 11) --- src/com/gitblit/wicket/pages/EditUserPage.java | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/com/gitblit/wicket/pages/EditUserPage.java b/src/com/gitblit/wicket/pages/EditUserPage.java index eafec05..4ba892f 100644 --- a/src/com/gitblit/wicket/pages/EditUserPage.java +++ b/src/com/gitblit/wicket/pages/EditUserPage.java @@ -31,8 +31,6 @@ import org.apache.wicket.model.Model; import org.apache.wicket.model.util.CollectionModel; import org.apache.wicket.model.util.ListModel; -import org.eclipse.jetty.http.security.Credential.Crypt; -import org.eclipse.jetty.http.security.Credential.MD5; import com.gitblit.Constants.AccessRestrictionType; import com.gitblit.GitBlit; @@ -114,8 +112,7 @@ return; } String password = userModel.password; - if (!password.toUpperCase().startsWith(Crypt.__TYPE) - && !password.toUpperCase().startsWith(MD5.__TYPE)) { + if (!password.toUpperCase().startsWith(StringUtils.MD5_TYPE)) { // This is a plain text password. // Check length. int minLength = GitBlit.getInteger(Keys.realm.minPasswordLength, 5); @@ -133,7 +130,8 @@ String type = GitBlit.getString(Keys.realm.passwordStorage, "md5"); if (type.equalsIgnoreCase("md5")) { // store MD5 digest of password - userModel.password = MD5.digest(userModel.password); + userModel.password = StringUtils.MD5_TYPE + + StringUtils.getMD5(userModel.password); } } @@ -145,7 +143,7 @@ userModel.repositories.clear(); userModel.repositories.addAll(repos); try { - GitBlit.self().editUserModel(oldName, userModel, isCreate); + GitBlit.self().updateUserModel(oldName, userModel, isCreate); } catch (GitBlitException e) { error(e.getMessage()); return; -- Gitblit v1.9.1