Conversation
…/AzureStorage Gate the extension allow-list check behind IncludedExtensions.Any() so an unset/empty allow-list means no restriction, matching MaxFileNameLength and MaxFileSizeInMb. Call ValidateFile(blob) as the first statement in each provider's SaveAsync override so configured limits are actually enforced. Co-authored-by: multica-agent <github@multica.ai>
…viders Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
SanitizeKey stripped every non-alphanumeric character, including the ":"/"/" delimiters separating Method:Endpoint:IdempotentKey, so distinct composite keys could collapse onto the same DB key backed by UX_CompositeKey and serve one request's cached response to another. Replace the strip-and-truncate logic with a SHA-256 hash of the full key, which is fixed-length, collision-resistant, and fits the existing 128-char column without truncation. Co-authored-by: multica-agent <github@multica.ai>
…gBehaviourTests EfCoreAuditHook publishes audit logs fire-and-forget (Task.Run, not awaited) after SaveChangesAsync returns. Every Create-block assertion on BehaviourCapturingPublisher.Logs.Count raced that background publish because it ran immediately after SaveChangesAsync with no delay, unlike the Update-block assertions in the same file which already wait. Add the same Task.Delay(1000) used elsewhere in this test class before each Create-block count assertion. Co-authored-by: multica-agent <github@multica.ai>
…enforcement [DRK-82] Enforce ValidateFile in blob SaveAsync (Local/AwsS3/AzureStorage)
…llision [DRK-76] Fix IdempotencyKeyEntity.SanitizeKey composite-key collision
Class-level meaning stays in <summary>; the property-level, policy- dependent meaning moves to a separate <remarks> section. Co-authored-by: multica-agent <github@multica.ai>
[DRK-133] Split AuditLogAttribute XML doc: move property-level behaviour into remarks
…eStore Replace lossy sanitization (regex-strip in NpgsqlStore, character replacement + whole-string lowercasing in DistributedCacheStore) with SHA-256 hex hashing, mirroring the fix already merged for MsSqlStore (PR #334). Guarantees structurally distinct composite keys never collapse onto the same stored/lookup key. - NpgsqlStore.IdempotencyKeyEntity.SanitizeKey: same hash approach as MsSqlStore; dead "no valid characters" branch and 128-char truncation removed (SHA-256 hex is always 64 chars). - IdempotencyDistributedCacheStore.SanitizeKey: hash the raw key, lowercase only the hex digest, keep the CachePrefix behavior. - Updated IdempotencyKeyRepositoryTests test that asserted the old case-folding collision as correct behavior; it now asserts the keys are treated as distinct per the fix. Old-format stored/cached keys will no longer match after upgrade; accepted per spec since idempotency entries are short-lived. Co-authored-by: multica-agent <github@multica.ai>
…and DistributedCacheStore Co-authored-by: multica-agent <github@multica.ai>
…orrect project Co-authored-by: multica-agent <github@multica.ai>
…izekey-hash [DRK-145] Fix idempotency SanitizeKey collisions in NpgsqlStore and DistributedCacheStore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promote the merged idempotency SanitizeKey collision fix from
devtomain.Changes included:
Packages affected: DKNet.AspCore.Idempotency, DKNet.AspCore.Idempotency.NpgsqlStore