Skip to content

Commit

Permalink
Security fix to ReactionBleed in WeKan. It is XSS in feature "Reactio…
Browse files Browse the repository at this point in the history
…n to comment".

Thanks to Alexander Starikov at Jet Infosystems (https://jetinfosystems.com/).
  • Loading branch information
xet7 committed Apr 17, 2023
1 parent ce35799 commit 47ac33d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion models/cardCommentReactions.js
Original file line number Diff line number Diff line change
@@ -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: [] }
});

Expand Down

0 comments on commit 47ac33d

Please sign in to comment.