Skip to content

DataCache regards base64-encoded data as url and crashes #655

Open
@hstehling

Description

@hstehling

I am using a custom plug-in that receives a custom data type as a parameter. This datatype contains GeometryBase instances (in this case: Meshes). Simplified example:

{
  "type": "MyDataType",
  "objects": [
    {
      "type": "MyOtherType",
      "geometry": "Base64-encoded Mesh"
    }
  ]
}

Now I came across a certain data set that produces a crash, and I tracked it down to this line in DataCache.cs:

if (jsonString.StartsWith("{") &&

Turns out that the Base64-encoded data coincidentially contains both urL and hTtP which makes the DataCache believe it found something. 🤯

Can this condition be defined more narrow in order to prevent such a false positive? I am not sure for what it is used or how the expected data structure looks.

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