diff --git a/src/main/java/org/olat/core/dispatcher/mapper/MapperDispatcher.java b/src/main/java/org/olat/core/dispatcher/mapper/MapperDispatcher.java index 7be47d5ebdd83530515604b273aed4a8f25a44da..ffe6d4d08b46f0b3d09b6ea11e5b1fdfdbff6e11 100644 --- a/src/main/java/org/olat/core/dispatcher/mapper/MapperDispatcher.java +++ b/src/main/java/org/olat/core/dispatcher/mapper/MapperDispatcher.java @@ -88,20 +88,21 @@ public class MapperDispatcher extends LogDelegator implements Dispatcher { // e.g. non-cacheable: 23423 // e.g. cacheable: my.mapper.path UserSession usess = CoreSpringFactory.getImpl(UserSessionManager.class).getUserSession(hreq); - Mapper m = CoreSpringFactory.getImpl(MapperService.class).getMapperById(usess, smappath); + MapperService mapperService = CoreSpringFactory.getImpl(MapperService.class); + Mapper m = mapperService.getMapperById(usess, smappath); if (m == null) { //an anonymous mapper? - m = CoreSpringFactory.getImpl(MapperService.class).getMapperById(null, smappath); + m = mapperService.getMapperById(null, smappath); if(m == null) { logWarn("Call to mapped resource, but mapper does not exist for path::" + smappath, null); - DispatcherModule.sendNotFound(pathInfo, hres); + hres.setStatus(HttpServletResponse.SC_NOT_FOUND); return; } } String mod = slashPos > 0 ? subInfo.substring(slashPos) : ""; if (mod.indexOf("..") != -1) { logWarn("Illegal mapper path::" + mod + " contains '..'", null); - DispatcherModule.sendForbidden(pathInfo, hres); + hres.setStatus(HttpServletResponse.SC_FORBIDDEN); return; } // /bla/blu.html