Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 13.0 Improve handling of invalid UTF-8 byte sequences #7833

Closed
m3hm3t opened this issue Jan 6, 2025 · 5 comments
Closed

Release 13.0 Improve handling of invalid UTF-8 byte sequences #7833

m3hm3t opened this issue Jan 6, 2025 · 5 comments
Assignees

Comments

@m3hm3t
Copy link
Contributor

m3hm3t commented Jan 6, 2025

SQLancer generates invalid UTF-8 byte sequences, resulting in errors such as:

ERROR: invalid byte sequence for encoding "UTF8": 0xee 0x22 0x20

Steps to Reproduce:

Insert a string with an invalid UTF-8 sequence:

INSERT INTO test_table (name) VALUES (E'\xee\x22\x20');

Expected Behavior:

Queries may validate input data and reject invalid byte sequences gracefully.

Suggested Solution:
Add input validation logic to reject malformed UTF-8 sequences.

Severity:
Not a blocker: This edge case affects robustness but doesn't disrupt overall functionality. While improving data validation or rejecting malformed data would enhance usability, it isn’t critical for the release.

@m3hm3t m3hm3t self-assigned this Jan 6, 2025
@m3hm3t
Copy link
Contributor Author

m3hm3t commented Jan 6, 2025

This problem also occurs in the release-12.1 tests.

@m3hm3t
Copy link
Contributor Author

m3hm3t commented Jan 6, 2025

@onurctirtir
Copy link
Member

Do we get a different error when the same insert is run on a Postgres table?

@m3hm3t
Copy link
Contributor Author

m3hm3t commented Jan 8, 2025

Do we get a different error when the same insert is run on a Postgres table?

No, we do not get a different error. This error originates from PostgreSQL's handling of invalid UTF-8 sequences. When the same INSERT query with an invalid UTF-8 sequence is run on a plain PostgreSQL table, PostgreSQL raises the exact same error.

@onurctirtir
Copy link
Member

I think we can close the issue then.

@m3hm3t m3hm3t closed this as completed Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants