Skip to content
Merged
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).

## [2.2.1] - 2026-10-16

### Fixed

- Reject null, empty, or whitespace-only attribute values in `create.ps1` and `update.ps1` with an attribute-specific audit error. All attributes are validated before anything is written, preventing empty values from being stored in the blocklist.

## [2.2.0] - 2026-08-03

### Added
Expand Down
7 changes: 7 additions & 0 deletions create.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ try {
$accessToken = $null
}

# Validate all attributes before writing anything to the blocklist
$actionMessage = "validating attributes"
$emptyAttributes = $attributeNames | Where-Object { [string]::IsNullOrWhiteSpace($actionContext.Data.$_) }
if ($emptyAttributes) {
throw "Attribute(s) [$($emptyAttributes -join ', ')] must not be null, empty or whitespace."
}

foreach ($attributeName in $attributeNames) {
# Check if attribute is in table
$actionMessage = "querying row in table [$table] where [$($attributeName)] = [$($actionContext.Data.$attributeName)]"
Expand Down
7 changes: 7 additions & 0 deletions update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,13 @@ try {
throw "The account reference could not be found"
}

# Validate all attributes before writing anything to the blocklist
$actionMessage = "validating attributes"
$emptyAttributes = $attributeNames | Where-Object { [string]::IsNullOrWhiteSpace($actionContext.Data.$_) }
if ($emptyAttributes) {
throw "Attribute(s) [$($emptyAttributes -join ', ')] must not be null, empty or whitespace."
}

foreach ($attributeName in $attributeNames) {
# Check if attribute is in table
$actionMessage = "querying row in table [$table] where [$($attributeName)] = [$($actionContext.Data.$attributeName)]"
Expand Down
Loading