Skip to content

sanitize strings#728

Merged
teelur merged 3 commits intomainfrom
sanitize-lunchflow-input
Feb 13, 2026
Merged

sanitize strings#728
teelur merged 3 commits intomainfrom
sanitize-lunchflow-input

Conversation

@teelur
Copy link
Owner

@teelur teelur commented Feb 13, 2026

It's possible lunchflow is providing strings will null terminators somewhere. Need to sanitize the strings just in case.

Copilot AI review requested due to automatic review settings February 13, 2026 00:49
@teelur teelur linked an issue Feb 13, 2026 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds string sanitization to remove null bytes from external API data to prevent PostgreSQL UTF8 encoding errors. The PR description mentions that LunchFlow may be providing strings with null terminators, and the implementation addresses this by introducing a SanitizeString method to strip null bytes from strings before database storage.

Changes:

  • Added SanitizeString method to TransactionService, SimpleFinService, and LunchFlowService to remove null bytes (\0) from strings
  • Applied sanitization to transaction-related string fields (SyncID, Category, Subcategory, MerchantName, Source) in TransactionService
  • Applied sanitization to transaction string fields (SyncID, MerchantName) from SimpleFin and LunchFlow external APIs

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
server/BudgetBoard.Service/TransactionService.cs Added SanitizeString method and applied it to transaction string fields in create, update, and split operations
server/BudgetBoard.Service/SimpleFinService.cs Added SanitizeString method and applied it to transaction ID and description fields from SimpleFin API
server/BudgetBoard.Service/LunchFlowService.cs Added SanitizeString method and applied it to transaction ID and merchant fields from LunchFlow API

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@teelur teelur merged commit e9beb51 into main Feb 13, 2026
9 checks passed
@teelur teelur deleted the sanitize-lunchflow-input branch February 13, 2026 02:09
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.

[BUG] Error on syncing accounts from LunchFlow

2 participants