Browse Source
Merge pull request #5823 from desoliture1/ruleChainNameNoXss
[3.3.3] Add noXss validation for names of ruleNodes
pull/5879/head
Andrew Shvayka
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
common/data/src/main/java/org/thingsboard/server/common/data/rule/RuleNode.java
|
|
|
@ -27,6 +27,7 @@ import org.thingsboard.server.common.data.SearchTextBasedWithAdditionalInfo; |
|
|
|
import org.thingsboard.server.common.data.id.RuleChainId; |
|
|
|
import org.thingsboard.server.common.data.id.RuleNodeId; |
|
|
|
import org.thingsboard.server.common.data.validation.Length; |
|
|
|
import org.thingsboard.server.common.data.validation.NoXss; |
|
|
|
|
|
|
|
@ApiModel |
|
|
|
@Data |
|
|
|
@ -41,6 +42,7 @@ public class RuleNode extends SearchTextBasedWithAdditionalInfo<RuleNodeId> impl |
|
|
|
@Length(fieldName = "type") |
|
|
|
@ApiModelProperty(position = 4, value = "Full Java Class Name of the rule node implementation. ", example = "com.mycompany.iot.rule.engine.ProcessingNode") |
|
|
|
private String type; |
|
|
|
@NoXss |
|
|
|
@Length(fieldName = "name") |
|
|
|
@ApiModelProperty(position = 5, value = "User defined name of the rule node. Used on UI and for logging. ", example = "Process sensor reading") |
|
|
|
private String name; |
|
|
|
|