From 13875a6437d4525ac4aeea25918f2d2dffac9ee1 Mon Sep 17 00:00:00 2001 From: Simon Urli Date: Wed, 22 Feb 2023 09:46:27 +0100 Subject: [PATCH] XWIKI-20672: Sanitize template URLs --- .../src/main/resources/flamingo/delete.vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/delete.vm b/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/delete.vm index c1a64fa27218..643526ed1690 100644 --- a/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/delete.vm +++ b/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/delete.vm @@ -307,9 +307,9 @@ #if("$!{request.xredirect}" != '') - #set($cancelUrl = "$request.xredirect") + #getSanitizedURLAttributeValue('a','href',$request.xredirect,$doc.getURL(),$cancelUrl) #else - #set($cancelUrl = $doc.getURL()) + #set($cancelUrl = $escapetool.xml($doc.getURL())) #end $escapetool.xml($services.localization.render('cancel')) #end