Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Fixed
- Fix flaky ResourceAwareTasksTests.testBasicTaskResourceTracking test ([#8993](https://github.com/opensearch-project/OpenSearch/pull/8993))
- Fix null_pointer_exception when creating or updating ingest pipeline ([#9259](https://github.com/opensearch-project/OpenSearch/pull/9259))

### Security

[Unreleased 3.0]: https://github.com/opensearch-project/OpenSearch/compare/2.x...HEAD
[Unreleased 2.x]: https://github.com/opensearch-project/OpenSearch/compare/2.10...2.x
[Unreleased 2.x]: https://github.com/opensearch-project/OpenSearch/compare/2.10...2.x
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,9 @@ public static Processor readProcessor(
String type,
Object config
) throws Exception {
if (config instanceof Map) {
if (config == null) {
throw newConfigurationException(type, null, null, "processor [" + type + "] cannot be null");
} else if (config instanceof Map) {
return readProcessor(processorFactories, scriptService, type, (Map<String, Object>) config);
} else if (config instanceof String && "script".equals(type)) {
Map<String, Object> normalizedScript = new HashMap<>(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ public void testReadProcessors() throws Exception {
assertThat(e2.getMetadata("opensearch.processor_tag"), equalTo(Collections.singletonList("my_second_unknown")));
assertThat(e2.getMetadata("opensearch.processor_type"), equalTo(Collections.singletonList("second_unknown_processor")));
assertThat(e2.getMetadata("opensearch.property_name"), is(nullValue()));

// test null config
List<Map<String, Object>> config3 = new ArrayList<>();
config3.add(Collections.singletonMap("null_processor", null));

OpenSearchParseException ex = expectThrows(
OpenSearchParseException.class,
() -> ConfigurationUtils.readProcessorConfigs(config3, scriptService, registry)
);
assertEquals(ex.getMessage(), "processor [null_processor] cannot be null");
}

public void testReadProcessorNullDescription() throws Exception {
Expand Down