mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 07:20:12 +01:00
Fix DOMPurify paths.
Thanks to xet7 !
This commit is contained in:
parent
573d4bf2cb
commit
90899f0928
9 changed files with 12 additions and 12 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import escapeForRegex from 'escape-string-regexp';
|
||||
import DOMPurify from 'dompurify';
|
||||
import { sanitizeText } from '/client/lib/secureDOMPurify';
|
||||
import { sanitizeText } from '../client/lib/secureDOMPurify';
|
||||
|
||||
CardComments = new Mongo.Collection('card_comments');
|
||||
|
||||
|
|
|
|||
|
|
@ -1759,7 +1759,7 @@ Cards.helpers({
|
|||
// Sanitize title on client side as well
|
||||
let sanitizedTitle = title;
|
||||
if (typeof title === 'string') {
|
||||
const { sanitizeTitle } = require('/server/lib/inputSanitizer');
|
||||
const { sanitizeTitle } = require('../server/lib/inputSanitizer');
|
||||
sanitizedTitle = sanitizeTitle(title);
|
||||
if (process.env.DEBUG === 'true' && sanitizedTitle !== title) {
|
||||
console.warn('Client-side sanitized card title:', title, '->', sanitizedTitle);
|
||||
|
|
@ -3575,7 +3575,7 @@ JsonRoutes.add('GET', '/api/boards/:boardId/cards_count', function(
|
|||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
|
||||
if (req.body.title) {
|
||||
const { sanitizeTitle } = require('/server/lib/inputSanitizer');
|
||||
const { sanitizeTitle } = require('../server/lib/inputSanitizer');
|
||||
const newTitle = sanitizeTitle(req.body.title);
|
||||
|
||||
if (process.env.DEBUG === 'true' && newTitle !== req.body.title) {
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ Lists.mutations({
|
|||
rename(title) {
|
||||
// Sanitize title on client side as well
|
||||
if (typeof title === 'string') {
|
||||
const { sanitizeTitle } = require('/server/lib/inputSanitizer');
|
||||
const { sanitizeTitle } = require('../server/lib/inputSanitizer');
|
||||
const sanitizedTitle = sanitizeTitle(title);
|
||||
if (process.env.DEBUG === 'true' && sanitizedTitle !== title) {
|
||||
console.warn('Client-side sanitized list title:', title, '->', sanitizedTitle);
|
||||
|
|
@ -653,7 +653,7 @@ if (Meteor.isServer) {
|
|||
|
||||
// Update title if provided
|
||||
if (req.body.title) {
|
||||
const { sanitizeTitle } = require('/server/lib/inputSanitizer');
|
||||
const { sanitizeTitle } = require('../server/lib/inputSanitizer');
|
||||
const newTitle = sanitizeTitle(req.body.title);
|
||||
|
||||
if (process.env.DEBUG === 'true' && newTitle !== req.body.title) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue