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

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

Open
hstehling opened this issue Mar 4, 2024 · 0 comments
Open

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

hstehling opened this issue Mar 4, 2024 · 0 comments

Comments

@hstehling
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant