-
Notifications
You must be signed in to change notification settings - Fork 104
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
Task/handle textunrestricted attr #2128
Conversation
CHANGES_NEXT_RELEASE
Outdated
@@ -1,2 +1,3 @@ | |||
- [cygnus-commons] Check TextUnrestricted type to escape character ' as '' (#2125) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something about this should be done in documenation?
Not sure in which .md. Do we have one about NGSIHandler? (in a similar way we have per-sink documents)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in f4bdb5e
doc/cygnus-ngsi/flume_extensions_catalogue/ngsi_rest_handler.md
Outdated
Show resolved
Hide resolved
@@ -0,0 +1 @@ | |||
An Attribute value of a TextUnrestricted type from an ContextBroker event is escaped from character ' to '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New .md files should be added to mkdoc.yml in the proper place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NTC, as the file has been deleted.
Co-authored-by: Fermín Galán Márquez <[email protected]>
@@ -0,0 +1 @@ | |||
An Attribute value of a TextUnrestricted type from an ContextBroker event is escaped from character ' to '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An Attribute value of a TextUnrestricted type from an ContextBroker event is escaped from character ' to '' | |
Cygnus escapes from `'` to `''` in attributes of type `TextUnrestricted` with the aim of avoiding injection attacks. | |
Note that other attributes (i.e. with type different to `TextUnrestricted` don't need such escaping as single quote (`'`) is a [forbidden character in Context Broker](https://fiware-orion.readthedocs.io/en/master/user/forbidden_characters/index.html) so that value will never arrives to Cygnus in notifications. |
To align the text with the one used in the other .md file.
doc/cygnus-ngsi/flume_extensions_catalogue/ngsi_rest_handler.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Fermín Galán Márquez <[email protected]>
Co-authored-by: Fermín Galán Márquez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
issue #2125
This fix applies to all sinks, all modes (row and column) but only for attr types which are TextUnrestricted