From 03aa72f9998a6d511b43600c6047e36b137c4400 Mon Sep 17 00:00:00 2001 From: Tomas Kracmar Date: Tue, 9 Jun 2026 13:51:13 +0200 Subject: [PATCH] Release v2.4.2: replace em-dashes with ASCII hyphens to fix encoding parse errors UTF-8 em-dashes (U+2014) in Elysium.Common.ps1 string literals were being misinterpreted by Windows PowerShell as containing quote characters when the file was read without a UTF-8 BOM. This caused cascading parse errors: unexpected tokens, missing closing braces, and missing catch blocks. All em-dashes in .ps1 files have been replaced with ASCII hyphens. All versions bumped to unified v2.4.2. --- Bump-Version.ps1 | 4 ++-- CHANGELOG.md | 7 +++++++ Elysium.Common.ps1 | 12 ++++++------ Elysium.ps1 | 2 +- ElysiumSettings.txt.sample | 2 +- Extract-NTHashes.ps1 | 2 +- Prepare-KHDBStorage.ps1 | 2 +- Test-WeakADPasswords.ps1 | 2 +- Uninstall.ps1 | 2 +- Update-KHDB.ps1 | 2 +- Update-LithnetStore.ps1 | 2 +- 11 files changed, 23 insertions(+), 16 deletions(-) diff --git a/Bump-Version.ps1 b/Bump-Version.ps1 index 385ae83..4aab065 100644 --- a/Bump-Version.ps1 +++ b/Bump-Version.ps1 @@ -8,7 +8,7 @@ ################################################## ## Project: Elysium ## ## File: Bump-Version.ps1 ## -## Version: 2.4.1 ## +## Version: 2.4.2 ## ## Support: support@cqre.net ## ################################################## @@ -149,7 +149,7 @@ if (-not $SkipChangelog) { --- -## [$NewVersion] — $today +## [$NewVersion] - $today ### Changed - (describe your change here) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a7c19e..ae79df7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ Starting with **v2.2.0**, Elysium uses a **unified project version**. All script --- +## [2.4.2] — 2026-06-09 + +### Fixed +- Replaced UTF-8 em-dashes (`\u2014`) in `Elysium.Common.ps1` and `Bump-Version.ps1` with ASCII hyphens. On Windows PowerShell without a UTF-8 BOM, the three-byte em-dash sequence was misinterpreted as containing a quote character, causing cascading parse errors (unexpected token, missing closing `)`/`}`/`catch`, etc.). + +--- + ## [2.4.1] — 2026-06-09 ### Fixed diff --git a/Elysium.Common.ps1 b/Elysium.Common.ps1 index 255bdc2..bd69249 100644 --- a/Elysium.Common.ps1 +++ b/Elysium.Common.ps1 @@ -1,4 +1,4 @@ -$script:ElysiumVersion = '2.4.1' +$script:ElysiumVersion = '2.4.2' function Invoke-RestartWithExecutable { param( @@ -342,7 +342,7 @@ function Test-ReplicationPermissions { [void]$callerSids.Add($adUser.SID.Value) # tokenGroups is a constructed attribute containing all SIDs in the user's token, - # including nested group memberships — more reliable than walking MemberOf recursively + # including nested group memberships - more reliable than walking MemberOf recursively $userDe = New-Object System.DirectoryServices.DirectoryEntry( "LDAP://$Server/$([System.Uri]::EscapeDataString($adUser.DistinguishedName))", $Credential.UserName, @@ -364,7 +364,7 @@ function Test-ReplicationPermissions { $domainSidStr = $adUser.SID.Value.Substring(0, $adUser.SID.Value.LastIndexOf('-')) $protectedUsersSid = "$domainSidStr-525" if ($callerSids.Contains($protectedUsersSid)) { - Write-Warning ("Account '{0}' is a member of Protected Users. This group restricts Kerberos delegation and RC4 authentication that DSInternals requires for DRS replication — access will be denied regardless of assigned rights." -f $Credential.UserName) + Write-Warning ("Account '{0}' is a member of Protected Users. This group restricts Kerberos delegation and RC4 authentication that DSInternals requires for DRS replication - access will be denied regardless of assigned rights." -f $Credential.UserName) } } catch { Write-Warning ("Could not resolve account SIDs for replication permission pre-check: {0}. Skipping." -f $_.Exception.Message) @@ -392,7 +392,7 @@ function Test-ReplicationPermissions { $aceExistsForGuid = $false foreach ($ace in $acl) { if ($ace.AccessControlType -ne [System.Security.AccessControl.AccessControlType]::Allow) { continue } - # InheritOnly ACEs apply to child objects only — the domain root itself is not covered + # InheritOnly ACEs apply to child objects only - the domain root itself is not covered if ([bool]($ace.PropagationFlags -band [System.Security.AccessControl.PropagationFlags]::InheritOnly)) { continue } $rights = $ace.ActiveDirectoryRights $hasExtended = [bool]($rights -band [System.DirectoryServices.ActiveDirectoryRights]::ExtendedRight) @@ -441,9 +441,9 @@ function Test-DCClockSkew { [System.Globalization.DateTimeStyles]::AssumeUniversal).ToUniversalTime() $skewSeconds = [Math]::Abs(([datetime]::UtcNow - $dcTime).TotalSeconds) if ($skewSeconds -gt 300) { - Write-Warning ("Clock skew of {0:N0}s with '{1}' exceeds Kerberos limit of 300s — authentication will fail. Sync the clock: w32tm /resync /force" -f $skewSeconds, $Server) + Write-Warning ("Clock skew of {0:N0}s with '{1}' exceeds Kerberos limit of 300s - authentication will fail. Sync the clock: w32tm /resync /force" -f $skewSeconds, $Server) } elseif ($skewSeconds -gt 60) { - Write-Warning ("Clock skew of {0:N0}s detected with '{1}'. Kerberos allows up to 300s — approaching the limit." -f $skewSeconds, $Server) + Write-Warning ("Clock skew of {0:N0}s detected with '{1}'. Kerberos allows up to 300s - approaching the limit." -f $skewSeconds, $Server) } else { Write-Host ("[+] Clock skew with '{0}': {1:N0}s (OK)." -f $Server, $skewSeconds) } diff --git a/Elysium.ps1 b/Elysium.ps1 index c396b0b..7b7c565 100644 --- a/Elysium.ps1 +++ b/Elysium.ps1 @@ -7,7 +7,7 @@ ################################################## ## Project: Elysium ## ## File: Elysium.ps1 ## -## Version: 2.4.1 ## +## Version: 2.4.2 ## ## Support: support@cqre.net ## ################################################## diff --git a/ElysiumSettings.txt.sample b/ElysiumSettings.txt.sample index 38613ff..7f43455 100644 --- a/ElysiumSettings.txt.sample +++ b/ElysiumSettings.txt.sample @@ -8,7 +8,7 @@ ################################################## ## Project: Elysium ## ## File: ElysiumSettings.txt ## -## Version: 2.4.1 ## +## Version: 2.4.2 ## ## Support: support@cqre.net ## ################################################## diff --git a/Extract-NTHashes.ps1 b/Extract-NTHashes.ps1 index 19a4530..77af921 100644 --- a/Extract-NTHashes.ps1 +++ b/Extract-NTHashes.ps1 @@ -7,7 +7,7 @@ ################################################## ## Project: Elysium ## ## File: Extract-NTHashes.ps1 ## -## Version: 2.4.1 ## +## Version: 2.4.2 ## ## Support: support@cqre.net ## ################################################## diff --git a/Prepare-KHDBStorage.ps1 b/Prepare-KHDBStorage.ps1 index 752ebc5..35a55fd 100644 --- a/Prepare-KHDBStorage.ps1 +++ b/Prepare-KHDBStorage.ps1 @@ -7,7 +7,7 @@ ################################################## ## Project: Elysium ## ## File: Prepare-KHDBStorage.ps1 ## -## Version: 2.4.1 ## +## Version: 2.4.2 ## ## Support: support@cqre.net ## ################################################## diff --git a/Test-WeakADPasswords.ps1 b/Test-WeakADPasswords.ps1 index 0b82eb4..4118617 100644 --- a/Test-WeakADPasswords.ps1 +++ b/Test-WeakADPasswords.ps1 @@ -8,7 +8,7 @@ ################################################## ## Project: Elysium ## ## File: Test-WeakADPasswords.ps1 ## -## Version: 2.4.1 ## +## Version: 2.4.2 ## ## Support: support@cqre.net ## ################################################## diff --git a/Uninstall.ps1 b/Uninstall.ps1 index 3b030e6..11a9b3b 100644 --- a/Uninstall.ps1 +++ b/Uninstall.ps1 @@ -7,7 +7,7 @@ ################################################## ## Project: Elysium ## ## File: Uninstall.ps1 ## -## Version: 2.4.1 ## +## Version: 2.4.2 ## ## Support: support@cqre.net ## ################################################## diff --git a/Update-KHDB.ps1 b/Update-KHDB.ps1 index 5e04882..8ca8ba4 100644 --- a/Update-KHDB.ps1 +++ b/Update-KHDB.ps1 @@ -7,7 +7,7 @@ ################################################## ## Project: Elysium ## ## File: Update-KHDB.ps1 ## -## Version: 2.4.1 ## +## Version: 2.4.2 ## ## Support: support@cqre.net ## ################################################## diff --git a/Update-LithnetStore.ps1 b/Update-LithnetStore.ps1 index 1a2ea32..df3132f 100644 --- a/Update-LithnetStore.ps1 +++ b/Update-LithnetStore.ps1 @@ -7,7 +7,7 @@ ################################################## ## Project: Elysium ## ## File: Update-LithnetStore.ps1 ## -## Version: 2.4.1 ## +## Version: 2.4.2 ## ## Support: support@cqre.net ## ##################################################