mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
Security fix to ReactionBleed in WeKan. It is XSS in feature "Reaction to comment".
Thanks to Alexander Starikov at Jet Infosystems (https://jetinfosystems.com/).
This commit is contained in:
parent
ce35799506
commit
47ac33d6c2
1 changed files with 10 additions and 1 deletions
|
@ -1,5 +1,14 @@
|
|||
const commentReactionSchema = new SimpleSchema({
|
||||
reactionCodepoint: { type: String, optional: false },
|
||||
reactionCodepoint: {
|
||||
type: String,
|
||||
optional: false,
|
||||
max: 9, // max length of reaction code
|
||||
custom() {
|
||||
if (!this.value.match(/^&#\d{4,6};$/)) { // regex for only valid reactions
|
||||
return "incorrectReactionCode";
|
||||
}
|
||||
},
|
||||
},
|
||||
userIds: { type: [String], defaultValue: [] }
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue