diff --git a/src/java/fr/paris/lutece/plugins/extend/modules/comment/web/CommentApp.java b/src/java/fr/paris/lutece/plugins/extend/modules/comment/web/CommentApp.java index 87b6fa0..a3f13a8 100644 --- a/src/java/fr/paris/lutece/plugins/extend/modules/comment/web/CommentApp.java +++ b/src/java/fr/paris/lutece/plugins/extend/modules/comment/web/CommentApp.java @@ -100,6 +100,7 @@ import fr.paris.lutece.util.html.Paginator; import fr.paris.lutece.util.http.SecurityUtil; import fr.paris.lutece.util.url.UrlItem; +import java.net.MalformedURLException; /** @@ -874,7 +875,16 @@ private XPage doRemoveComment( HttpServletRequest request, String strIdExtendabl HttpServletResponse response = LocalVariables.getResponse( ); try { - response.sendRedirect( strFromUrl ); + // Open redirect control (set baseUrl in lutece properties in case of ReverseProxy) + if ( strFromUrl.startsWith( AppPathService.getBaseUrl( request ) ) ) + { + response.sendRedirect( strFromUrl ); + } + else + { + AppLogService.error( "WARNING : Incorrect base URL", new MalformedURLException() ); + } + } catch (IOException e) {