commit | 983c25064edeada19bd46aa604a9b90e23778a90 | [log] [tgz] |
---|---|---|
author | Thomas Wolf <thomas.wolf@paranor.ch> | Wed Apr 14 17:47:38 2021 +0200 |
committer | Thomas Wolf <thomas.wolf@paranor.ch> | Wed Apr 14 17:48:34 2021 +0200 |
tree | a4cb4105eab7103fc76eab88316dc9120fef559f | |
parent | 91b2e167a2341d41212ea801943fb82a148e3b7f [diff] |
ssh: ensure list is modifiable before using Iterator.remove(). Bug: 572849 Change-Id: If6be0024d2069e2d85541d7e87c6b0371db4b3df Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitKexExtensionHandler.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitKexExtensionHandler.java index 489c77d..9446aaa 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitKexExtensionHandler.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitKexExtensionHandler.java
@@ -129,8 +129,8 @@ // such that supported ones are at the front, in client order, // followed by unsupported ones, also in client order. if (serverAlgorithms != null && !serverAlgorithms.isEmpty()) { - List<NamedFactory<Signature>> clientAlgorithms = session - .getSignatureFactories(); + List<NamedFactory<Signature>> clientAlgorithms = new ArrayList<>( + session.getSignatureFactories()); if (log.isDebugEnabled()) { log.debug( "handleServerSignatureAlgorithms({}): PubkeyAcceptedAlgorithms before: {}", //$NON-NLS-1$