Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,13 @@ private String getMasterMasterPasswordFromSettingsSecurityXml() {
}
if (Files.exists(xml)) {
try (InputStream is = Files.newInputStream(xml)) {
return (String) XPathFactory.newInstance()
String result = (String) XPathFactory.newInstance()
.newXPath()
.evaluate("//master", new InputSource(is), XPathConstants.STRING);
if (result != null) {
result = result.trim();
}
return result;
} catch (Exception e) {
// just ignore whatever it is
}
Expand Down
4 changes: 3 additions & 1 deletion src/test/legacy/legacy-settings-security-2.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<settingsSecurity>
<relocation>to the moon</relocation>
<master>{KDvsYOFLlXgH4LU8tvpzAGg5otiosZXvfdQq0yO86LU=}</master>
<master>
{KDvsYOFLlXgH4LU8tvpzAGg5otiosZXvfdQq0yO86LU=}
</master>
</settingsSecurity>
Loading