FIWARE : Errors when dealing with Locale caracters (french for instance) as Payload

Viewed 43

I am currently testing some SmartDataModels (SmartDestination/Events), and when I try to add an entity in which the description contains some french caracters like "é" or "à", the Orion CB rejects my payload with the following error message :

entityCreate009 400 Bad Request {"error":"BadRequest","description":"Invalid characters in attribute value"}

... because it contains an "é"

The tested JSON payload (NGSI v2) is this one : https://raw.githubusercontent.com/smart-data-models/dataModel.TourismDestinations/2ab2bac0fae5893ba4310714823e293c9030f8c1/Event/examples/example.json

Do I need to provide specific option in order to deal with Locale caracters ?

Many thanks in advance for your help Rgds Laurent

1 Answers

Some characters are not allowed in attribute value in order to avoid script injections attack in some circumstances. The set of forbidden characters is described in Orion documentation.

Note "é" or "à" are not in this list, but probably you are using some other that is forbidden and you are getting the error due to this reason.

You can use attribute type TextUnrestricted to avoid this Orion protection mechanism. But use it at your own risk! ;)

Related