Skip to content

Commit e026498

Browse files
authored
Update embedded SSH client for modern authentication (#1422)
Replace the unmaintained JSch dependency so RSA identities can authenticate using SHA-2 signatures. Preserve its version-specific implementations when shading so the bundled deployment client retains the supported algorithms.
1 parent f5ef1c6 commit e026498

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

‎pom.xml‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@
284284
<!-- Embedded SSH Client -->
285285
<dependency>
286286
<!-- BSD -->
287-
<groupId>com.jcraft</groupId>
287+
<groupId>com.github.mwiede</groupId>
288288
<artifactId>jsch</artifactId>
289-
<version>0.1.55</version>
289+
<version>2.28.8</version>
290290
</dependency>
291291

292292
<!-- Charset detection library -->
@@ -513,6 +513,7 @@
513513
<!--<mainClass>com.laytonsmith.core.MainSandbox</mainClass>-->
514514
</manifest>
515515
<manifestEntries>
516+
<Multi-Release>true</Multi-Release>
516517
<paperweight-mappings-namespace>mojang</paperweight-mappings-namespace>
517518
<Class-Path>../bukkit.jar CommandHelper/bukkit.jar</Class-Path>
518519
</manifestEntries>
@@ -524,7 +525,7 @@
524525
<plugin>
525526
<groupId>org.apache.maven.plugins</groupId>
526527
<artifactId>maven-shade-plugin</artifactId>
527-
<version>3.5.2</version>
528+
<version>3.6.2</version>
528529
<executions>
529530
<execution>
530531
<id>ShadedBundle</id>
@@ -550,7 +551,7 @@
550551
<include>org.yaml:snakeyaml:jar:*</include>
551552
<include>com.googlecode.json-simple:json-simple:jar:*</include>
552553
<include>org.mindrot:jBCrypt:jar:*</include>
553-
<include>com.jcraft:jsch:jar:*</include>
554+
<include>com.github.mwiede:jsch:jar:*</include>
554555
<include>org.apache.commons:commons-io:jar:*</include>
555556
<include>org.xerial:sqlite-jdbc:jar:*</include>
556557
<include>net.sourceforge.jchardet:jchardet:jar:*</include>
@@ -611,6 +612,12 @@
611612
<pattern>com.jcraft.jsch</pattern>
612613
<shadedPattern>com.laytonsmith.libs.com.jcraft.jsch</shadedPattern>
613614
</relocation>
615+
<!-- Versioned classes must remain overrides of their relocated base classes. -->
616+
<relocation>
617+
<pattern>^META-INF/versions/([0-9]+)/com/jcraft/jsch/</pattern>
618+
<shadedPattern>META-INF/versions/$1/com/laytonsmith/libs/com/jcraft/jsch/</shadedPattern>
619+
<rawString>true</rawString>
620+
</relocation>
614621
<relocation>
615622
<pattern>org.apache.commons.io</pattern>
616623
<shadedPattern>com.laytonsmith.libs.org.apache.commons.io</shadedPattern>

0 commit comments

Comments
 (0)