OpenSearch/modules
Stuart Tettemer 791a9d5102
Scripting: enable regular expressions by default (#63029) (#63272)
* Setting `script.painless.regex.enabled` has a new option,
  `use-factor`, the default.  This defaults to using regular
  expressions but limiting the complexity of the regular
  expressions.

  In addition to `use-factor`, the setting can be `true`, as
  before, which enables regular expressions without limiting them.

  `false` totally disables regular expressions, which was the
  old default.

* New setting `script.painless.regex.limit-factor`.  This limits
  regular expression complexity by limiting the number characters
  a regular expression can consider based on input length.

  The default is `6`, so a regular expression can consider
  `6` * input length number of characters.  With input
  `foobarbaz` (length `9`), for example, the regular expression
  can consider `54` (`6 * 9`) characters.

  This reduces the impact of exponential backtracking in Java's
  regular expression engine.

* add `@inject_constant` annotation to whitelist.

  This annotation signals that a compiler settings will
  be injected at the beginning of a whitelisted method.

  The format is `argnum=settingname`:
  `1=foo_setting 2=bar_setting`.

  Argument numbers must start at one and must be sequential.

* Augment
  `Pattern.split(CharSequence)`
  `Pattern.split(CharSequence, int)`,
  `Pattern.splitAsStream(CharSequence)`
  `Pattern.matcher(CharSequence)`
  to take the value of `script.painless.regex.limit-factor` as a
  an injected parameter, limiting as explained above when this
  setting is in use.

Fixes: #49873
Backport of: 93f29a4
2020-10-05 13:17:47 -05:00
..
aggs-matrix-stats Only call reduce on a single InternalAggregation when needed (#62525) (#62594) 2020-09-18 08:43:58 +02:00
analysis-common Do not create two loggers for DeprecationLogger backport(#58435) (#61530) 2020-08-26 16:04:02 +02:00
geo Add search `fields` parameter to support high-level field retrieval. (#60258) 2020-07-28 10:58:20 -07:00
ingest-common [7.x] Make for each processor resistant to field modification (#62791) (#62807) 2020-09-23 10:46:00 +02:00
ingest-geoip [7.x] Add network from MaxMind Geo ASN database (#61676) (#62898) 2020-10-01 11:01:44 -05:00
ingest-user-agent Do not create two loggers for DeprecationLogger backport(#58435) (#61530) 2020-08-26 16:04:02 +02:00
kibana Simplify adding plugins and modules to testclusters (#61886) 2020-09-03 19:37:46 -07:00
lang-expression Upgrade lucene to lucene-8.7.0-snapshot-3b59906 (#62978) 2020-09-28 16:52:31 -04:00
lang-mustache Support point in time in async_search (#61560) 2020-09-10 19:25:48 -04:00
lang-painless Scripting: enable regular expressions by default (#63029) (#63272) 2020-10-05 13:17:47 -05:00
mapper-extras Move FieldMapper#valueFetcher to MappedFieldType (#62974) (#63220) 2020-10-04 14:54:59 +01:00
parent-join Move FieldMapper#valueFetcher to MappedFieldType (#62974) (#63220) 2020-10-04 14:54:59 +01:00
percolator Move FieldMapper#valueFetcher to MappedFieldType (#62974) (#63220) 2020-10-04 14:54:59 +01:00
rank-eval Optimize XContentParserUtils.ensureExpectedToken (#62691) (#63253) 2020-10-05 19:08:32 +02:00
reindex System index auto-creation should not be disabled by user settings (#62984) (#63147) 2020-10-01 16:26:07 -04:00
repository-url [7.x] Introduce javaRestTest source set/task and convert modules (#59939) (#60026) 2020-07-28 08:39:11 -05:00
systemd [7.x] Remove integTest task from PluginBuildPlugin (#61879) (#62135) 2020-09-09 14:25:41 -05:00
transport-netty4 Transfer network bytes to smaller buffer (#62673) 2020-10-01 10:39:24 -06:00
build.gradle Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00