Skip to content

Investigate null byte exclusion #43

@Liam-DeVoe

Description

@Liam-DeVoe

We have this code:

    if schema_type == "string":
        # Exclude null bytes due to reflect-cpp truncation bug:
        # https://github.com/getml/reflect-cpp/issues/559
        # Exclude surrogates (Cs category) as they're invalid in UTF-8/JSON
        return st.text(
            alphabet=st.characters(
                blacklist_characters="\x00",
                blacklist_categories=("Cs",),  # type: ignore[arg-type]
            ),
            min_size=schema.get("min_size", 0),
            max_size=schema.get("max_size"),
        )

This should not be a server-side restriction, and should be a library-side restriction imposed by hegel-cpp over the wire instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething is clearly wrong here

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions