From: James Moger Date: Thu, 5 Mar 2015 14:10:02 +0000 (-0500) Subject: Update SLF4j, JGit, Groovy, BouncyCastle, Mina, Gson, Freemarker, libpam4j, args4j... X-Git-Tag: v1.7.0~1^2~84 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=006651e6002feadc940066633290fb15d526c3b0;p=gitblit.git Update SLF4j, JGit, Groovy, BouncyCastle, Mina, Gson, Freemarker, libpam4j, args4j, Jedis, waffle-jna, Unboundid --- diff --git a/.classpath b/.classpath index bc6b9672..9539a097 100644 --- a/.classpath +++ b/.classpath @@ -8,15 +8,15 @@ - + - - + + - + @@ -41,24 +41,24 @@ - + - - - - + + + + - + - - - + + + @@ -67,13 +67,13 @@ - - - - - - - + + + + + + + @@ -88,6 +88,7 @@ + diff --git a/build.moxie b/build.moxie index 9465af10..03c1f7f0 100644 --- a/build.moxie +++ b/build.moxie @@ -103,15 +103,16 @@ repositories: central, eclipse-snapshots, eclipse, gitblit # Convenience properties for dependencies properties: { jetty.version : 9.2.9.v20150224 + slf4j.version : 1.7.10 wicket.version : 1.4.21 lucene.version : 4.10.0 - jgit.version : 3.5.1.201410131835-r - groovy.version : 2.3.3 - bouncycastle.version : 1.49 + jgit.version : 3.6.2.201501210735-r + groovy.version : 2.4.1 + bouncycastle.version : 1.51 selenium.version : 2.28.0 wikitext.version : 1.4 sshd.version: 0.13.0 - mina.version: 2.0.7 + mina.version: 2.0.9 guice.version : 4.0-beta5 # Gitblit maintains a fork of guice-servlet guice-servlet.version : 4.0-gb1 @@ -131,11 +132,11 @@ properties: { dependencies: - compile 'com.google.inject:guice:${guice.version}' :war :fedclient - compile 'com.google.inject.extensions:guice-servlet:${guice-servlet.version}' :war -- compile 'com.google.guava:guava:17.0' :war :fedclient +- compile 'com.google.guava:guava:18.0' :war :fedclient - compile 'com.intellij:annotations:12.0' :war - compile 'log4j:log4j:1.2.17' :war :fedclient -- compile 'org.slf4j:slf4j-api:1.7.7' :war :fedclient -- compile 'org.slf4j:slf4j-log4j12:1.7.7' :war :fedclient +- compile 'org.slf4j:slf4j-api:${slf4j.version}' :war :fedclient +- compile 'org.slf4j:slf4j-log4j12:${slf4j.version}' :war :fedclient - compile 'com.sun.mail:javax.mail:1.5.1' :war - compile 'javax.servlet:javax.servlet-api:3.1.0' :fedclient - compile 'org.eclipse.jetty.aggregate:jetty-all:${jetty.version}' @jar @@ -162,20 +163,20 @@ dependencies: - compile 'org.apache.sshd:sshd-core:${sshd.version}' :war !org.easymock - compile 'org.apache.mina:mina-core:${mina.version}' :war !org.easymock - compile 'rome:rome:0.9' :war :manager :api -- compile 'com.google.code.gson:gson:2.2.2' :war :fedclient :manager :api +- compile 'com.google.code.gson:gson:2.3.1' :war :fedclient :manager :api - compile 'org.codehaus.groovy:groovy-all:${groovy.version}' :war -- compile 'com.unboundid:unboundid-ldapsdk:2.3.0' :war +- compile 'com.unboundid:unboundid-ldapsdk:2.3.8' :war - compile 'org.apache.ivy:ivy:2.2.0' :war - compile 'com.toedter:jcalendar:1.3.2' :authority - compile 'org.apache.commons:commons-compress:1.4.1' :war - compile 'commons-io:commons-io:2.2' :war - compile 'com.force.api:force-partner-api:24.0.0' :war -- compile 'org.freemarker:freemarker:2.3.20' :war -- compile 'com.github.dblock.waffle:waffle-jna:1.5' :war -- compile 'org.kohsuke:libpam4j:1.7' :war -- compile 'args4j:args4j:2.0.26' :war :fedclient +- compile 'org.freemarker:freemarker:2.3.22' :war +- compile 'com.github.dblock.waffle:waffle-jna:1.7.3' :war +- compile 'org.kohsuke:libpam4j:1.8' :war +- compile 'args4j:args4j:2.0.29' :war :fedclient - compile 'commons-codec:commons-codec:1.7' :war -- compile 'redis.clients:jedis:2.3.1' :war +- compile 'redis.clients:jedis:2.6.2' :war - compile 'ro.fortsoft.pf4j:pf4j:0.9.0' :war - compile 'org.apache.tika:tika-core:1.5' :war - compile 'org.jsoup:jsoup:1.7.3' :war diff --git a/gitblit.iml b/gitblit.iml index 8f2e2977..990df65e 100644 --- a/gitblit.iml +++ b/gitblit.iml @@ -47,13 +47,13 @@ - + - + - + @@ -91,24 +91,24 @@ - + - + - + - + - + - + @@ -135,13 +135,13 @@ - + - + - + @@ -408,13 +408,13 @@ - + - + - + @@ -485,46 +485,46 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -540,13 +540,13 @@ - + - + - + @@ -573,35 +573,35 @@ - + - + - + - + - + - + - + - + - + @@ -692,79 +692,79 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -922,6 +922,17 @@ + + + + + + + + + + + diff --git a/src/main/java/com/gitblit/manager/PluginManager.java b/src/main/java/com/gitblit/manager/PluginManager.java index bc3be52f..b3936e5d 100644 --- a/src/main/java/com/gitblit/manager/PluginManager.java +++ b/src/main/java/com/gitblit/manager/PluginManager.java @@ -15,12 +15,13 @@ */ package com.gitblit.manager; -import java.io.BufferedInputStream; import java.io.File; import java.io.FileFilter; import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.InetSocketAddress; import java.net.Proxy; @@ -61,8 +62,7 @@ import com.gitblit.utils.Base64; import com.gitblit.utils.FileUtils; import com.gitblit.utils.JsonUtils; import com.gitblit.utils.StringUtils; -import com.google.common.io.Files; -import com.google.common.io.InputSupplier; +import com.google.common.io.ByteStreams; import com.google.inject.Inject; import com.google.inject.Singleton; @@ -533,12 +533,9 @@ public class PluginManager implements IPluginManager, PluginStateListener { // try to get the server-specified last-modified date of this artifact long lastModified = conn.getHeaderFieldDate("Last-Modified", System.currentTimeMillis()); - Files.copy(new InputSupplier() { - @Override - public InputStream getInput() throws IOException { - return new BufferedInputStream(conn.getInputStream()); - } - }, tmpFile); + try (InputStream is = conn.getInputStream(); OutputStream os = new FileOutputStream(tmpFile);) { + ByteStreams.copy(is, os); + } File destFile = new File(pFolder, StringUtils.getLastPathElement(u.getPath())); if (destFile.exists()) { diff --git a/src/main/java/com/gitblit/utils/X509Utils.java b/src/main/java/com/gitblit/utils/X509Utils.java index f0c1b9df..fc0b797d 100644 --- a/src/main/java/com/gitblit/utils/X509Utils.java +++ b/src/main/java/com/gitblit/utils/X509Utils.java @@ -80,7 +80,10 @@ import org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils; import org.bouncycastle.cert.jcajce.JcaX509v3CertificateBuilder; import org.bouncycastle.jce.PrincipalUtil; import org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier; +import org.bouncycastle.openssl.PEMEncryptor; import org.bouncycastle.openssl.PEMWriter; +import org.bouncycastle.openssl.jcajce.JcaPEMWriter; +import org.bouncycastle.openssl.jcajce.JcePEMEncryptorBuilder; import org.bouncycastle.operator.ContentSigner; import org.bouncycastle.operator.OperatorCreationException; import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder; @@ -883,8 +886,11 @@ public class X509Utils { if (pemFile.exists()) { pemFile.delete(); } - PEMWriter pemWriter = new PEMWriter(new FileWriter(pemFile)); - pemWriter.writeObject(pair.getPrivate(), "DES-EDE3-CBC", clientMetadata.password.toCharArray(), new SecureRandom()); + JcePEMEncryptorBuilder builder = new JcePEMEncryptorBuilder("DES-EDE3-CBC"); + builder.setSecureRandom(new SecureRandom()); + PEMEncryptor pemEncryptor = builder.build(clientMetadata.password.toCharArray()); + JcaPEMWriter pemWriter = new JcaPEMWriter(new FileWriter(pemFile)); + pemWriter.writeObject(pair.getPrivate(), pemEncryptor); pemWriter.writeObject(userCert); pemWriter.writeObject(caCert); pemWriter.flush(); diff --git a/src/main/java/com/gitblit/utils/cli/CmdLineParser.java b/src/main/java/com/gitblit/utils/cli/CmdLineParser.java index e698eb54..09ae8366 100644 --- a/src/main/java/com/gitblit/utils/cli/CmdLineParser.java +++ b/src/main/java/com/gitblit/utils/cli/CmdLineParser.java @@ -429,5 +429,15 @@ public class CmdLineParser { public boolean isMultiValued() { return false; } + + @Override + public boolean help() { + return true; + } + + @Override + public String[] forbids() { + return new String [0]; + } } }