Skip to content

Commit 7234ca2

Browse files
authored
Update ETag hashing algorithm (#240974)
Closes elastic/kibana-team#2027 ## Summary Changes the ETag algorithm from sha1 to sha512 to be FIPS 140-3 compliant. I guess the only downside to this change is that the browsers that did the requests when it was still done with sha1 will have a cache miss and will need to request again the whole response. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
1 parent 4fdda9b commit 7234ca2

File tree

1 file changed

+1
-1
lines changed
  • src/platform/plugins/shared/data_views/server/rest_api_routes/internal

1 file changed

+1
-1
lines changed

src/platform/plugins/shared/data_views/server/rest_api_routes/internal/fields.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { parseFields, querySchema, validate } from './fields_for';
1818
import { DEFAULT_FIELD_CACHE_FRESHNESS } from '../../constants';
1919

2020
export function calculateHash(srcBuffer: Buffer) {
21-
const hash = createHash('sha1'); // eslint-disable-line @kbn/eslint/no_unsafe_hash
21+
const hash = createHash('sha256');
2222
hash.update(srcBuffer);
2323
return hash.digest('hex');
2424
}

0 commit comments

Comments
 (0)