diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f20b68..0708020 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v0.1.21] +### Fixed +- Register Share encryption validation switch + ## [v0.1.20] ### Fixed - Register Share encryption validation for entropy `none` diff --git a/internal/adapters/handlers/rest/sharehdl/validator.go b/internal/adapters/handlers/rest/sharehdl/validator.go index 02338ee..a0a3022 100644 --- a/internal/adapters/handlers/rest/sharehdl/validator.go +++ b/internal/adapters/handlers/rest/sharehdl/validator.go @@ -15,8 +15,7 @@ func (v *validator) validateShare(share *Share) *api.Error { } switch share.Entropy { - case EntropyNone: - case "": + case "", EntropyNone: if share.Salt != "" || share.Iterations != 0 || share.Length != 0 || share.Digest != "" || share.EncryptionPart != "" || share.EncryptionSession != "" { return api.ErrBadRequestWithMessage("if entropy is not set, encryption parameters should not be set") }