Problem when the entity value attribute contain special character

Viewed 116

I have tied to insert in OCB an entity with a password attribute codified:

{
        "id": "prueba-tipo-string2",
        "type": "StringParser",
       "dateObserved": {
            "type": "DateTime",
            "value": "2020-08-13T08:56:56.00Z"
        },
        "password": {
            "type": "text",
            "value": "U2FsdGVkX10bFP8Rj7xLAQDFwMBphXpK/+leH3mlpQ="
        }
    }
  • OCB always response to me with the following error: "found a forbidden character in the value of an attribute"
  • In Postman
{
    "error": "BadRequest",
    "description": "Invalid characters in attribute value"
}
1 Answers

Orion restricts the usage of some characters due to security reasons (script injections attack in some circumstances), see this piece of documentation. In particular, the = you have in the password attribute value.

You can avoid this, for instance, by encoding the password in base 64, or using URL encoding before storing it in Orion.

Another alternative using TextUnrestricted in attribute type. This special attribute type does not check if the attribute value contains a forbidden character. However, it could have security implications, use it at your own risk!

Related