From: Jim Procter Date: Wed, 26 Jan 2022 18:32:17 +0000 (+0000) Subject: Merge branch 'releases/Release_2_11_1_Branch' X-Git-Tag: Release_2_11_2_2~1^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d058e3b834662b66263d53621cf54064ff479374;hp=794f8d83f55c5cbf5fdd0a9c6a6e279a54420786;p=jalview.git Merge branch 'releases/Release_2_11_1_Branch' --- diff --git a/RELEASE b/RELEASE index 1acd0a7..2f6ffff 100644 --- a/RELEASE +++ b/RELEASE @@ -1,2 +1,2 @@ jalview.release=releases/Release_2_11_1_Branch -jalview.version=2.11.1.5 +jalview.version=2.11.1.7 diff --git a/help/help/html/releases.html b/help/help/html/releases.html index 9d3c568..eb4a68f 100755 --- a/help/help/html/releases.html +++ b/help/help/html/releases.html @@ -56,6 +56,43 @@ li:before { New Features Issues Resolved + + 2.11.1.7
+ 18/01/2022
+ + + + + Security + + + + + 2.11.1.6
+ 6/01/2022
+ + Security + + + + 2.11.1.5
diff --git a/help/help/html/whatsNew.html b/help/help/html/whatsNew.html index 97b1b2d..40b51d1 100755 --- a/help/help/html/whatsNew.html +++ b/help/help/html/whatsNew.html @@ -24,17 +24,14 @@

- Jalview 2.11.1.5 + Jalview 2.11.1.7

-

Jalview 2.11.1.5 is a critical patch release that updates one - of the open source components, log4j, that Jalview relies on. The - update addresses the widely reported log4shell security - vunerability. This release also addresses a bug in the occupancy - calculation that occurs when working with alignments of more than - 32,000 sequences.

+

Jalview 2.11.1.7 is a patch release that addresses connectivity + issues for third party services over HTTPS, and problems experienced + by Windows users when saving files from Jalview.

For the full release notes, see the Jalview 2.11.1.5 + href="releases.html#Jalview.2.11.1.7">the Jalview 2.11.1.7 release notes.

diff --git a/j11lib/log4j-1.2-api-2.16.0.jar b/j11lib/log4j-1.2-api-2.17.0.jar similarity index 50% rename from j11lib/log4j-1.2-api-2.16.0.jar rename to j11lib/log4j-1.2-api-2.17.0.jar index 6bfe217..a361ddc 100644 Binary files a/j11lib/log4j-1.2-api-2.16.0.jar and b/j11lib/log4j-1.2-api-2.17.0.jar differ diff --git a/j11lib/log4j-api-2.16.0.jar b/j11lib/log4j-api-2.17.0.jar similarity index 72% rename from j11lib/log4j-api-2.16.0.jar rename to j11lib/log4j-api-2.17.0.jar index 2cdcc4b..77af535 100644 Binary files a/j11lib/log4j-api-2.16.0.jar and b/j11lib/log4j-api-2.17.0.jar differ diff --git a/j8lib/log4j-core-2.16.0.jar b/j11lib/log4j-core-2.17.0.jar similarity index 77% rename from j8lib/log4j-core-2.16.0.jar rename to j11lib/log4j-core-2.17.0.jar index bc913bc..256ff3d 100644 Binary files a/j8lib/log4j-core-2.16.0.jar and b/j11lib/log4j-core-2.17.0.jar differ diff --git a/j8lib/log4j-slf4j18-impl-2.16.0.jar b/j11lib/log4j-slf4j18-impl-2.17.0.jar similarity index 70% rename from j8lib/log4j-slf4j18-impl-2.16.0.jar rename to j11lib/log4j-slf4j18-impl-2.17.0.jar index ad6dd5b..43b077b 100644 Binary files a/j8lib/log4j-slf4j18-impl-2.16.0.jar and b/j11lib/log4j-slf4j18-impl-2.17.0.jar differ diff --git a/j8lib/log4j-1.2-api-2.16.0.jar b/j8lib/log4j-1.2-api-2.17.0.jar similarity index 50% rename from j8lib/log4j-1.2-api-2.16.0.jar rename to j8lib/log4j-1.2-api-2.17.0.jar index 6bfe217..a361ddc 100644 Binary files a/j8lib/log4j-1.2-api-2.16.0.jar and b/j8lib/log4j-1.2-api-2.17.0.jar differ diff --git a/j8lib/log4j-api-2.16.0.jar b/j8lib/log4j-api-2.17.0.jar similarity index 72% rename from j8lib/log4j-api-2.16.0.jar rename to j8lib/log4j-api-2.17.0.jar index 2cdcc4b..77af535 100644 Binary files a/j8lib/log4j-api-2.16.0.jar and b/j8lib/log4j-api-2.17.0.jar differ diff --git a/j11lib/log4j-core-2.16.0.jar b/j8lib/log4j-core-2.17.0.jar similarity index 77% rename from j11lib/log4j-core-2.16.0.jar rename to j8lib/log4j-core-2.17.0.jar index bc913bc..256ff3d 100644 Binary files a/j11lib/log4j-core-2.16.0.jar and b/j8lib/log4j-core-2.17.0.jar differ diff --git a/j11lib/log4j-slf4j18-impl-2.16.0.jar b/j8lib/log4j-slf4j18-impl-2.17.0.jar similarity index 70% rename from j11lib/log4j-slf4j18-impl-2.16.0.jar rename to j8lib/log4j-slf4j18-impl-2.17.0.jar index ad6dd5b..43b077b 100644 Binary files a/j11lib/log4j-slf4j18-impl-2.16.0.jar and b/j8lib/log4j-slf4j18-impl-2.17.0.jar differ diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 19de95e..3ba5967 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -247,6 +247,9 @@ public class Jalview // anything else! + // allow https handshakes to download intermediate certs if necessary + System.setProperty("com.sun.security.enableAIAcaIssuers", "true"); + final String jabawsUrl = aparser.getValue("jabaws"); if (jabawsUrl != null) { diff --git a/src/jalview/io/AlignFile.java b/src/jalview/io/AlignFile.java index 497f0a5..b30fe33 100755 --- a/src/jalview/io/AlignFile.java +++ b/src/jalview/io/AlignFile.java @@ -20,13 +20,6 @@ */ package jalview.io; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.Sequence; -import jalview.datamodel.SequenceGroup; -import jalview.datamodel.SequenceI; -import jalview.util.MessageManager; - import java.io.IOException; import java.util.ArrayList; import java.util.Enumeration; @@ -34,6 +27,13 @@ import java.util.Hashtable; import java.util.List; import java.util.Vector; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceGroup; +import jalview.datamodel.SequenceI; +import jalview.util.MessageManager; + /** * DOCUMENT ME! * @@ -79,6 +79,8 @@ public abstract class AlignFile extends FileParse private boolean parseImmediately = true; + private boolean dataClosed = false; + /** * @return if doParse() was called at construction time */ @@ -164,6 +166,12 @@ public abstract class AlignFile extends FileParse public AlignFile(boolean parseImmediately, FileParse source) throws IOException { + this(parseImmediately, source, true); + } + + public AlignFile(boolean parseImmediately, FileParse source, + boolean closeData) throws IOException + { super(source); initData(); @@ -173,7 +181,7 @@ public abstract class AlignFile extends FileParse if (parseImmediately) { - doParse(); + doParse(closeData); } } @@ -184,6 +192,11 @@ public abstract class AlignFile extends FileParse */ public void doParse() throws IOException { + doParse(true); + } + + public void doParse(boolean closeData) throws IOException + { if (parseCalled) { throw new IOException( @@ -192,6 +205,11 @@ public abstract class AlignFile extends FileParse } parseCalled = true; parse(); + if (closeData && !dataClosed) + { + dataIn.close(); + dataClosed = true; + } } /** diff --git a/src/jalview/io/FastaFile.java b/src/jalview/io/FastaFile.java index 9acd7da..c698a31 100755 --- a/src/jalview/io/FastaFile.java +++ b/src/jalview/io/FastaFile.java @@ -20,14 +20,14 @@ */ package jalview.io; +import java.io.IOException; + import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.Annotation; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceI; -import java.io.IOException; - /** * DOCUMENT ME! * @@ -69,7 +69,12 @@ public class FastaFile extends AlignFile public FastaFile(FileParse source) throws IOException { - super(source); + this(source, true); + } + + public FastaFile(FileParse source, boolean closeData) throws IOException + { + super(true, source, closeData); } public FastaFile(SequenceI[] seqs) diff --git a/src/jalview/io/FeaturesFile.java b/src/jalview/io/FeaturesFile.java index 7e62f6b..3f1cdd1 100755 --- a/src/jalview/io/FeaturesFile.java +++ b/src/jalview/io/FeaturesFile.java @@ -1393,7 +1393,9 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI } catch (IOException q) { } - FastaFile parser = new FastaFile(this); + // Opening a FastaFile object with the remainder of this object's dataIn. + // Tell the constructor to NOT close the dataIn when finished. + FastaFile parser = new FastaFile(this, false); List includedseqs = parser.getSeqs(); SequenceIdMatcher smatcher = new SequenceIdMatcher(newseqs); diff --git a/src/jalview/project/Jalview2XML.java b/src/jalview/project/Jalview2XML.java index 0e062ac..4f92736 100644 --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@ -53,6 +53,7 @@ import java.util.IdentityHashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -2071,9 +2072,9 @@ public class Jalview2XML { final PDBEntry pdbentry = bindingModel.getPdbEntry(peid); final String pdbId = pdbentry.getId(); - if (!pdbId.equals(entry.getId()) - && !(entry.getId().length() > 4 && entry.getId().toLowerCase() - .startsWith(pdbId.toLowerCase()))) + if (!pdbId.equals(entry.getId()) && !(entry.getId().length() > 4 + && entry.getId().toLowerCase(Locale.ROOT) + .startsWith(pdbId.toLowerCase(Locale.ROOT)))) { /* * not interested in a binding to a different PDB entry here @@ -2898,6 +2899,7 @@ public class Jalview2XML entryCount++; } } while (jarentry != null); + jin.close(); resolveFrefedSequences(); } catch (IOException ex) { diff --git a/test/jalview/io/BackupFilesTest.java b/test/jalview/io/BackupFilesTest.java index 1386bfe..d9f28c5 100644 --- a/test/jalview/io/BackupFilesTest.java +++ b/test/jalview/io/BackupFilesTest.java @@ -278,7 +278,13 @@ public class BackupFilesTest @AfterClass(alwaysRun = true) private void cleanupTmpFiles() { - File newfile = new File(newFile); + cleanupTmpFiles(newFile, suffix, digits); + } + + protected static void cleanupTmpFiles(String file, String mysuffix, + int mydigits) + { + File newfile = new File(file); if (newfile.exists()) { newfile.delete(); diff --git a/test/jalview/io/WindowsFileLoadAndSaveTest.java b/test/jalview/io/WindowsFileLoadAndSaveTest.java new file mode 100644 index 0000000..b644848 --- /dev/null +++ b/test/jalview/io/WindowsFileLoadAndSaveTest.java @@ -0,0 +1,93 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ +package jalview.io; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.StandardCopyOption; + +import org.testng.Assert; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import jalview.bin.Cache; +import jalview.datamodel.AlignmentI; +import jalview.gui.AlignFrame; +import jalview.gui.JvOptionPane; + +/** + * WindowsFileSaveTest simply opens an alignment file and then tries to save it. + * This failed in Windows from 2.11.0 to 2.11.1.6 due to a combination of the + * opening file handle being left open ad infinitum, causing the BackupFiles + * operation of moving the saved (temp) file onto the original filename to fail, + * but only in Windows. See: https://issues.jalview.org/browse/JAL-3628 + * https://issues.jalview.org/browse/JAL-3703 + * https://issues.jalview.org/browse/JAL-3935 These issues are really all fixed + * by JAL-3703 This test is to ensure it doesn't start again, but note that this + * test will only fail in Windows. + */ +public class WindowsFileLoadAndSaveTest +{ + + private final static String fileName = "examples" + File.separator + + "uniref50.fa"; + + private final static String testFileName = fileName + "-TEST"; + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + + /** + * Test saving and re-reading in a specified format + * + * @throws IOException + */ + @Test(groups = { "Functional" }) + public void loadAndSaveAlignment() throws IOException + { + Cache.initLogger(); + File file = new File(fileName); + File testFile = new File(testFileName); + Files.copy(file.toPath(), testFile.toPath(), + StandardCopyOption.REPLACE_EXISTING); + FormatAdapter fa = new FormatAdapter(); + AlignmentI a = fa.readFile(fileName, DataSourceType.FILE, + FileFormat.Fasta); + + AlignFrame af = new AlignFrame(a, 500, 500); + Assert.assertTrue(af.saveAlignment(testFileName, FileFormat.Fasta)); + } + + @AfterClass(alwaysRun = true) + private void cleanupTmpFiles() + { + BackupFilesPresetEntry bfpe = BackupFilesPresetEntry + .getSavedBackupEntry(); + BackupFilesTest.cleanupTmpFiles(testFileName, bfpe.suffix, bfpe.digits); + } + +}