Skip to content

feat: Add tid/sid validation to system save update endpoint - #83

Open
SirzBenjie wants to merge 3 commits into
masterfrom
feat/sid-check-on-system-endpoint
Open

feat: Add tid/sid validation to system save update endpoint#83
SirzBenjie wants to merge 3 commits into
masterfrom
feat/sid-check-on-system-endpoint

Conversation

@SirzBenjie

Copy link
Copy Markdown
Member

Add tid/sid validation to the system save endpoint as it is done in the updateAll endpoint.

This addresses an issue that would allow a malformed or modified save to send a save with a tid/sid that didn't match the database record, preventing the user from saving any data.

As part of this change, extracted out logic shared between the updateAll method and the update case block in the handleSystem method for DRYness.

Comment thread api/endpoints.go Outdated

@DayKev DayKev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basic testing shows everything working.

  • A valid save could be loaded and updated without issues
  • A save with re-applied system migrators was blocked from uploading
  • A save from an older version was blocked from uploading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants