You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We reviewed changes in 9d1323c...f503b1f on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
The three issues line up around edges of external input: escaping tab/newline in exported fields, coercing config booleans from settings[key], and assuming attributes is always a dict for .items().
You’re already encapsulating payload/config nicely; tightening the “what shape do we accept at the boundary?” story would catch these together.
The reason will be displayed to describe this comment to others. Learn more.
Unescaped `\t`/`\n` fields enable protocol record injection
Payload fields are inserted directly into a tab/newline-delimited protocol. If upstream data contains \n or \t, attackers can split lines and inject unintended records, corrupting import integrity.
Add strict escaping or validation for every serialized field before concatenation, rejecting control characters in check_import_table_data and build_header
The reason will be displayed to describe this comment to others. Learn more.
`row.get("attributes", {})` can be `None`, causing `.items()` crash
rows may include malformed records where attributes is None or another non-dict type. Iteration then raises AttributeError, failing the whole import batch.
Add a mapping type check and fallback to {} or skip invalid rows with explicit validation before .items()
override_import_settings normalizes every allowed key as boolean. Non-boolean configuration entries can be silently converted to 0/1, which can produce invalid import settings and rejected downstream imports.
Restrict boolean normalization to explicit boolean keys and preserve sanitized string overrides for non-boolean keys.
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
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.
No description provided.