From f9acad9421954f2d3f410762a9067e695ed93b4e Mon Sep 17 00:00:00 2001 From: Rudolf Meijering Date: Fri, 26 Jun 2020 14:14:42 +0200 Subject: [PATCH] [7.8] Fixes #69639: Ignore url.url fields above 2048 characters (#69863) (#69931) * Fixes #69639: Ignore url.url fields above 2048 characters (#69863) * Fix types in 7.8 * Fix core docs --- ...na-plugin-core-server.savedobjectscorefieldmapping.fields.md | 1 + .../kibana-plugin-core-server.savedobjectscorefieldmapping.md | 2 +- src/core/server/saved_objects/mappings/types.ts | 1 + src/core/server/server.api.md | 1 + src/plugins/share/server/saved_objects/url.ts | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md index db774a055e528..4f88b635ca2f7 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md @@ -10,6 +10,7 @@ fields?: { [subfield: string]: { type: string; + ignore_above?: number; }; }; ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md index dbc7d0ca431ce..9a31d37b3ff30 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md @@ -17,7 +17,7 @@ export interface SavedObjectsCoreFieldMapping | Property | Type | Description | | --- | --- | --- | | [enabled](./kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md) | boolean | | -| [fields](./kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md) | {
[subfield: string]: {
type: string;
};
} | | +| [fields](./kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md) | {
[subfield: string]: {
type: string;
ignore_above?: number;
};
} | | | [index](./kibana-plugin-core-server.savedobjectscorefieldmapping.index.md) | boolean | | | [null\_value](./kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md) | number | boolean | string | | | [type](./kibana-plugin-core-server.savedobjectscorefieldmapping.type.md) | string | | diff --git a/src/core/server/saved_objects/mappings/types.ts b/src/core/server/saved_objects/mappings/types.ts index c1b65763949bb..8362d1f16bd2a 100644 --- a/src/core/server/saved_objects/mappings/types.ts +++ b/src/core/server/saved_objects/mappings/types.ts @@ -137,6 +137,7 @@ export interface SavedObjectsCoreFieldMapping { fields?: { [subfield: string]: { type: string; + ignore_above?: number; }; }; } diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index bfdb74a7bf082..7ca5426f4b04d 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -1884,6 +1884,7 @@ export interface SavedObjectsCoreFieldMapping { fields?: { [subfield: string]: { type: string; + ignore_above?: number; }; }; // (undocumented) diff --git a/src/plugins/share/server/saved_objects/url.ts b/src/plugins/share/server/saved_objects/url.ts index c76c21993a13f..3ea64ad4719f7 100644 --- a/src/plugins/share/server/saved_objects/url.ts +++ b/src/plugins/share/server/saved_objects/url.ts @@ -46,6 +46,7 @@ export const url: SavedObjectsType = { fields: { keyword: { type: 'keyword', + ignore_above: 2048, }, }, },