Skip to content

Commit d18af65

Browse files
committed
[opensearch role] Fix nil pointer
Closes #326
1 parent cbb1231 commit d18af65

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
### Fixed
8+
* [opensearch role] Possible nil pointer on not setting tenant permission
89

910
## [2.0.7] - 2022-12-06
1011
### Changed

es/util.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,10 @@ func indexPermissionsHash(v interface{}) int {
600600
}
601601

602602
func tenantPermissionsHash(v interface{}) int {
603+
if v == nil {
604+
return hashcode("")
605+
}
606+
603607
var buf bytes.Buffer
604608
m := v.(map[string]interface{})
605609

0 commit comments

Comments
 (0)