Skip to content

sanitiseTableName() doesn't escape unicode/emoji #4801

@e-gineer

Description

@e-gineer

Description

Doesn't escape unicode or emoji in table names. PostgreSQL requires escaping these, leading to SQL errors or potential injection.

Severity

MEDIUM - SQL errors / potential security issue

Test Reference

TestSanitiseTableName/unicode_table_name and /emoji_in_table_name in pkg/interactive/interactive_helpers_test.go:541

Impact

  • SQL queries fail with unicode/emoji table names
  • Poor internationalization
  • Potential SQL injection with crafted unicode

Related Code

  • pkg/interactive/interactive_client_autocomplete.go:111-123

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions