mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 00:16:16 +00:00
Merge branch 'develop' of https://github.com/sleuthkit/autopsy into 7084-FeedbackWhileLoadingArtifacts
This commit is contained in:
commit
2b79afa27e
@ -35,7 +35,7 @@ AutoIngestSettingsPanel.ImageDirectoryUnspecified=Shared images folder must be s
|
|||||||
AutoIngestSettingsPanel.InvalidPortNumber=Invalid port number.
|
AutoIngestSettingsPanel.InvalidPortNumber=Invalid port number.
|
||||||
AutoIngestSettingsPanel.jRadioButtonCopyFiles.text=File Copy mode
|
AutoIngestSettingsPanel.jRadioButtonCopyFiles.text=File Copy mode
|
||||||
AutoIngestSettingsPanel.KeywordSearchNull=Cannot find Keyword Search service
|
AutoIngestSettingsPanel.KeywordSearchNull=Cannot find Keyword Search service
|
||||||
AutoIngestSettingsPanel.MustRestart=Autopsy must be restarted for new configuration to take effect
|
AutoIngestSettingsPanel.MustRestart=Application must be restarted for new configuration to take effect
|
||||||
AutoIngestSettingsPanel.nodePanel.TabConstraints.tabTitle=Node Configuration
|
AutoIngestSettingsPanel.nodePanel.TabConstraints.tabTitle=Node Configuration
|
||||||
AutoIngestSettingsPanel.NodeStatusLogging.text=Node Status Logging Settings
|
AutoIngestSettingsPanel.NodeStatusLogging.text=Node Status Logging Settings
|
||||||
AutoIngestSettingsPanel.restartRequiredLabel.text=Application restart required to take effect.
|
AutoIngestSettingsPanel.restartRequiredLabel.text=Application restart required to take effect.
|
||||||
|
@ -35,7 +35,7 @@ AutoIngestSettingsPanel.ImageDirectoryUnspecified=Shared images folder must be s
|
|||||||
AutoIngestSettingsPanel.InvalidPortNumber=Invalid port number.
|
AutoIngestSettingsPanel.InvalidPortNumber=Invalid port number.
|
||||||
AutoIngestSettingsPanel.jRadioButtonCopyFiles.text=File Copy mode
|
AutoIngestSettingsPanel.jRadioButtonCopyFiles.text=File Copy mode
|
||||||
AutoIngestSettingsPanel.KeywordSearchNull=Cannot find Keyword Search service
|
AutoIngestSettingsPanel.KeywordSearchNull=Cannot find Keyword Search service
|
||||||
AutoIngestSettingsPanel.MustRestart=Autopsy must be restarted for new configuration to take effect
|
AutoIngestSettingsPanel.MustRestart=Application must be restarted for new configuration to take effect
|
||||||
AutoIngestSettingsPanel.nodePanel.TabConstraints.tabTitle=Node Configuration
|
AutoIngestSettingsPanel.nodePanel.TabConstraints.tabTitle=Node Configuration
|
||||||
AutoIngestSettingsPanel.NodeStatusLogging.text=Node Status Logging Settings
|
AutoIngestSettingsPanel.NodeStatusLogging.text=Node Status Logging Settings
|
||||||
AutoIngestSettingsPanel.restartRequiredLabel.text=Application restart required to take effect.
|
AutoIngestSettingsPanel.restartRequiredLabel.text=Application restart required to take effect.
|
||||||
|
@ -184,7 +184,14 @@ class Chunker implements Iterator<Chunk>, Iterable<Chunk> {
|
|||||||
return new StringBuilder(UTF_16.decode(UTF_16.encode(s)));
|
return new StringBuilder(UTF_16.decode(UTF_16.encode(s)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static StringBuilder sanitize(String s) {
|
/**
|
||||||
|
* Wrapper method that performs UTF-8 string sanitization.
|
||||||
|
*
|
||||||
|
* @param s String to be sanitized.
|
||||||
|
*
|
||||||
|
* @return Sanitized string.
|
||||||
|
*/
|
||||||
|
static StringBuilder sanitize(String s) {
|
||||||
String normStr = Normalizer.normalize(s, Normalizer.Form.NFKC);
|
String normStr = Normalizer.normalize(s, Normalizer.Form.NFKC);
|
||||||
return sanitizeToUTF8(replaceInvalidUTF16(normStr));
|
return sanitizeToUTF8(replaceInvalidUTF16(normStr));
|
||||||
}
|
}
|
||||||
|
@ -232,7 +232,7 @@ class Ingester {
|
|||||||
//Make a SolrInputDocument out of the field map
|
//Make a SolrInputDocument out of the field map
|
||||||
SolrInputDocument updateDoc = new SolrInputDocument();
|
SolrInputDocument updateDoc = new SolrInputDocument();
|
||||||
for (String key : fields.keySet()) {
|
for (String key : fields.keySet()) {
|
||||||
updateDoc.addField(key, fields.get(key));
|
updateDoc.addField(key, Chunker.sanitize((String)fields.get(key)).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -49,12 +49,12 @@ class LanguageSpecificContentIndexingHelper {
|
|||||||
List<String> values = new ArrayList<>();
|
List<String> values = new ArrayList<>();
|
||||||
values.add(chunk.toString());
|
values.add(chunk.toString());
|
||||||
if (fields.containsKey(Server.Schema.FILE_NAME.toString())) {
|
if (fields.containsKey(Server.Schema.FILE_NAME.toString())) {
|
||||||
values.add(fields.get(Server.Schema.FILE_NAME.toString()).toString());
|
values.add(Chunker.sanitize(fields.get(Server.Schema.FILE_NAME.toString()).toString()).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// index the chunk to a language specific field
|
// index the chunk to a language specific field
|
||||||
fields.put(Server.Schema.CONTENT_JA.toString(), values);
|
fields.put(Server.Schema.CONTENT_JA.toString(), values);
|
||||||
fields.put(Server.Schema.LANGUAGE.toString(), language.getValue());
|
fields.put(Server.Schema.LANGUAGE.toString(), Chunker.sanitize(language.getValue()).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void indexMiniChunk(Chunker.Chunk chunk, String sourceName, Map<String, Object> fields, String baseChunkID, Language language)
|
void indexMiniChunk(Chunker.Chunk chunk, String sourceName, Map<String, Object> fields, String baseChunkID, Language language)
|
||||||
@ -62,15 +62,15 @@ class LanguageSpecificContentIndexingHelper {
|
|||||||
//Make a SolrInputDocument out of the field map
|
//Make a SolrInputDocument out of the field map
|
||||||
SolrInputDocument updateDoc = new SolrInputDocument();
|
SolrInputDocument updateDoc = new SolrInputDocument();
|
||||||
for (String key : fields.keySet()) {
|
for (String key : fields.keySet()) {
|
||||||
updateDoc.addField(key, fields.get(key));
|
updateDoc.addField(key, Chunker.sanitize((String)fields.get(key)).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
updateDoc.setField(Server.Schema.ID.toString(), MiniChunkHelper.getChunkIdString(baseChunkID));
|
updateDoc.setField(Server.Schema.ID.toString(), Chunker.sanitize(MiniChunkHelper.getChunkIdString(baseChunkID)).toString());
|
||||||
|
|
||||||
// index the chunk to a language specific field
|
// index the chunk to a language specific field
|
||||||
updateDoc.addField(Server.Schema.CONTENT_JA.toString(), chunk.toString().substring(chunk.getBaseChunkLength()));
|
updateDoc.addField(Server.Schema.CONTENT_JA.toString(), Chunker.sanitize(chunk.toString().substring(chunk.getBaseChunkLength())).toString());
|
||||||
updateDoc.addField(Server.Schema.LANGUAGE.toString(), language.getValue());
|
updateDoc.addField(Server.Schema.LANGUAGE.toString(), Chunker.sanitize(language.getValue()).toString());
|
||||||
|
|
||||||
TimingMetric metric = HealthMonitor.getTimingMetric("Solr: Index chunk");
|
TimingMetric metric = HealthMonitor.getTimingMetric("Solr: Index chunk");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user