Skip to content

fix(persistence): validate delete and exist keys - #805

Merged
41tair merged 1 commit into
mainfrom
fix/37990-validate-persistence-keys
Aug 14, 2026
Merged

fix(persistence): validate delete and exist keys#805
41tair merged 1 commit into
mainfrom
fix/37990-validate-persistence-keys

Conversation

@WH-2099

@WH-2099 WH-2099 commented Aug 14, 2026

Copy link
Copy Markdown
Member

Description

Validate persistence keys before Delete and Exist reach the cache, storage, or database.
This aligns them with Save and Load and prevents traversal keys from probing or deleting another tenant or plugin’s data.

Refs langgenius/dify#37990

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • Other

Essential Checklist

Testing

  • I have tested the changes locally and confirmed they work as expected
  • I have added unit tests where necessary and they pass successfully

Bug Fix (if applicable)

  • I have used GitHub syntax to close the related issue (the related issue is a cross-repository umbrella checklist)

Additional Information

  • go vet ./internal/core/persistence
  • go test ./internal/core/persistence -run ^TestPersistencePathTraversal$ -count=1
  • The local persistence suite skips its service-backed assertions when Redis or PostgreSQL is unavailable; CI starts both services and runs the regression test.

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working go Pull requests that update go code labels Aug 14, 2026
@WH-2099 WH-2099 self-assigned this Aug 14, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 14, 2026
@41tair
41tair merged commit 1508955 into main Aug 14, 2026
7 checks passed
@41tair
41tair deleted the fix/37990-validate-persistence-keys branch August 14, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants