Skip to content

Releases: aldelo/common

v1.7.7

16 Mar 05:41

Choose a tag to compare

Fix: DynamoDB ExpressionAttributeValues stripping

Fixes InvalidParameter - Value provided in ExpressionAttributeValues unused in expressions errors when update expressions contain value placeholders inside REMOVE clauses.

Root Cause

DynamoDB's REMOVE clause only takes attribute paths — it does not consume value placeholders (:name). When the expression contained something like REMOVE GSIPKEDCBaseKeyValue, UpUTC=:UpUTC, our stripping logic searched the raw expression string and incorrectly considered :UpUTC as "used". DynamoDB correctly rejected it as unused.

Changes

  • exprWithoutRemove() — new helper that parses the expression with splitUpdateSections() and rebuilds it excluding REMOVE clause bodies. Only SET, ADD, DELETE, and ConditionExpression are checked for value references.
  • containsExactToken() — word-boundary-aware token matching (prevents :UpIP from matching inside :UpIPAddress)
  • Defense-in-depth — stripping runs at the lowest level (updateItemWithTrace / updateItemNormal) right before the DynamoDB API call, catching all callers regardless of code path

Includes all v1.7.6 fixes

  • Comprehensive 4-round codebase audit (28 files, 603 insertions, 280 deletions)
  • Race conditions, nil panics, resource leaks, logic errors across all wrappers
  • See v1.7.6 release notes for full details

v1.7.5

13 Mar 03:34

Choose a tag to compare

Bug Fixes

  • DynamoDB UpdateExpression: Fix duplicate UniqueFields path causing ValidationException — resolved three bugs in the Update() UniqueFields expression builder:
    1. Redundant code block added a second REMOVE UniqueFields after the first block already appended it
    2. Incorrect REMOVE UniqueFields created from nothing on SET-only updates to records with unique fields
    3. Stale unique index values used when SET and REMOVE simultaneously modified different unique fields

Dependency Updates

  • Bump filippo.io/edwards25519 to v1.1.1

v1.7.4

12 Mar 18:18

Choose a tag to compare

Full Changelog: v1.7.1...v1.7.4

v1.7.1

14 Feb 06:46

Choose a tag to compare

v1.7.0

09 Feb 13:28

Choose a tag to compare

What's Changed

  • Fix race conditions in TCP server, remove deprecated x509 APIs, resolve variable shadowing by @Copilot in #47
  • [WIP] Fix HTTP response body leak on error paths by @Copilot in #48
  • Optimize deduplication, error wrapping, and eliminate magic numbers by @Copilot in #51
  • Fix resource leaks and improve connection pool management by @Copilot in #50
  • Fix memory exhaustion, deprecated crypto, and resource leaks by @Copilot in #49
  • [WIP] Standardize error wrapping and update deprecated rand.Seed pattern by @Copilot in #53
  • Add defensive nil checks for TCPServer maps by @Copilot in #52
  • Replace unsafe type assertion with comma-ok idiom in rsaPublicKeyFromPem by @Copilot in #54
  • Fix nil pointer dereferences and race conditions in wrapper/apc by @Copilot in #55
  • Add nil receiver checks and parameter validation to wrapper/apc package by @Copilot in #56
  • Add nil receiver checks to AwsHttp2Client methods by @Copilot in #57
  • Add nil checks for AWS KMS API responses to prevent panics by @Copilot in #58
  • Add defensive checks and remove dead code in KMS wrapper by @Copilot in #59
  • Fix race condition in cognito.GetOpenIdTokenForDeveloperIdentity by @Copilot in #60
  • Add nil receiver checks to BedrockRuntime and Cognito public methods by @Copilot in #61
  • Add thread safety to SES wrapper with mutex protection by @Copilot in #62
  • Add nil receiver checks to S3 operation methods by @Copilot in #63
  • Add nil receiver checks to SNS wrapper methods by @Copilot in #64
  • Add nil receiver guards to SQS wrapper methods by @Copilot in #65
  • Add nil receiver checks to GinZap methods by @Copilot in #66
  • Add nil receiver guards and fix HTTP server leak in hystrixgo CircuitBreaker by @Copilot in #67
  • Add nil receiver guards to IoT wrapper methods by @Copilot in #68
  • Add nil receiver guards to MySql and MySqlTransaction public methods by @Copilot in #69
  • Add nil receiver guards to Redis wrapper methods by @Copilot in #70
  • Add nil receiver guards to SQLite wrapper methods by @Copilot in #71
  • Add nil receiver guards to SQLServer public methods by @Copilot in #72
  • Add nil receiver checks to Textract methods by @Copilot in #73
  • Add nil receiver guards to WAF2 public methods by @Copilot in #74
  • Add nil receiver guards to ViperConf public methods by @Copilot in #75

Full Changelog: v1.6.9...v1.7.0

v1.6.9

24 Jan 03:52

Choose a tag to compare

Full Changelog: v1.6.8...v1.6.9

v1.6.8

23 Jan 15:36

Choose a tag to compare

What's Changed

  • Add thread-safe access to MySql wrapper state and fix scan helper data propagation by @Copilot in #44
  • Update for creating v2 (2019.11.21) DynamoDB Global Tables by @yao-bin in #45
  • Check for v2 (2019.11.21) Global Table existing or not by @yao-bin in #46

New Contributors

  • @Copilot made their first contribution in #44

Full Changelog: v1.6.7...v1.6.8

Update including recent changes

27 Nov 13:47

Choose a tag to compare

What's Changed

  • feat: add ImportIntermediateCAPublicKey methods by @he-zhenpan in #40
  • fix: correct Redis store initialization by adding missing parameter by @he-zhenpan in #41
  • fix: improve TTL handling in Redis key retrieval logic by @he-zhenpan in #43

Full Changelog: v1.6.6...v1.6.7

v1.6.6

23 Aug 01:56

Choose a tag to compare

Full Changelog: v1.6.5...v1.6.6

v1.6.5

23 Aug 01:45
de1d3b1

Choose a tag to compare

What's Changed

  • added Cognito and IoT wrappers by @yao-bin in #35
  • updated Cognito and IoT wrapper to AWS SDK v2 by @yao-bin in #36
  • Added RefreshOpenIdTokenForDeveloperIdentity by @yao-bin in #37
  • Support PKCS#1 format and PKCS#8 format both for RSA decrypt and sign… by @yao-bin in #39

Full Changelog: v1.6.4...v1.6.5