Skip to content

[Bug] Address autocomplete does not safely encode query text #219

Open

Description

@dajiaohuang

The address autocomplete provider builds JSON with "{\"query\": \"" + address + "\"}" and then writes it as UTF-8, but sets Content-Length using the platform-default address.getBytes() encoding. A query containing a quote, backslash, or line break can produce invalid JSON; a non-ASCII query can produce a byte-length mismatch on environments whose default charset is not UTF-8. Please serialize the query as JSON and derive the content length from the exact UTF-8 payload bytes. This is a defect in the autocomplete feature added for #157.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions