diff options
author | James Moger <james.moger@gitblit.com> | 2015-03-07 09:27:05 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2015-03-07 09:27:05 -0500 |
commit | d40a44c8c8df8f6bd81c93e72314224f85656f18 (patch) | |
tree | 02d29a778875c019dd1e839acda3d27558f0e423 /src/main/java/com/gitblit/transport/ssh | |
parent | ec7fb78e7992c7b3ff14410f56f64d3b2c402bcc (diff) | |
parent | 8b70d52151e825e3711c2283861a919a14dc3a7b (diff) | |
download | gitblit-d40a44c8c8df8f6bd81c93e72314224f85656f18.tar.gz gitblit-d40a44c8c8df8f6bd81c93e72314224f85656f18.zip |
Merge branch 'ticket/245' into develop
Diffstat (limited to 'src/main/java/com/gitblit/transport/ssh')
-rw-r--r-- | src/main/java/com/gitblit/transport/ssh/SshKey.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/transport/ssh/SshKey.java b/src/main/java/com/gitblit/transport/ssh/SshKey.java index ab44854a..9c99d1a5 100644 --- a/src/main/java/com/gitblit/transport/ssh/SshKey.java +++ b/src/main/java/com/gitblit/transport/ssh/SshKey.java @@ -27,6 +27,7 @@ import org.eclipse.jgit.lib.Constants; import com.gitblit.Constants.AccessPermission; import com.gitblit.utils.StringUtils; +import com.google.common.base.Joiner; /** * Class that encapsulates a public SSH key and it's metadata. @@ -51,7 +52,8 @@ public class SshKey implements Serializable { private AccessPermission permission; public SshKey(String data) { - this.rawData = data; + // strip out line breaks (issue-571) + this.rawData = Joiner.on("").join(data.replace("\r\n", "\n").split("\n")); this.permission = AccessPermission.PUSH; } |