gslone
gslone
WWindmill
Created by gslone on 4/14/2024 in #help
Null bytes in JSON
Hey, I want to pass a JSON object into a script that must contain null-bytes in strings. Like so:
{
"unicodePwd": "a\u0000"
}
{
"unicodePwd": "a\u0000"
}
(background: the LDAP password attribute must be passed as UTF-16) I'm getting the error "error returned from database: unsupported Unicode escape sequence". It should be valid JSON though, and other JSON parsers seem to accept this. Is there anything that I can do here?
4 replies
WWindmill
Created by gslone on 4/14/2024 in #help
Script to hub: How to pass in Ressources?
Hey, I was thinking about publishing a python script to Hub. My scripts need a config in the form of a ressource (for authentication etc.). I've seen how python scripts do this on the hub - they pass in a dict and the metadata states that this dict is of format "resource-<resource_type>" (also documented here: https://www.windmill.dev/docs/core_concepts/json_schema_and_parsing#script-parameters-to-json-schema). I can't get it to work. In my Script, I go to "Settings" -> Autogenerated UI -> "Customize" my parameter, and choose a ressource type. When I save this, it reverts back to just being an object. All other changes (like parameter descriptions etc.) persist. Could this be a bug or am I doing it wrong?
11 replies