Skip to content
Snippets Groups Projects
Commit 45842d9b authored by srosse's avatar srosse
Browse files

OO-2402. don't try to launch a resource if there is nothing to launch,...

OO-2402. don't try to launch a resource if there is nothing to launch, hardened the authentication dispatcher to accept manipulated urls and redirect them to the current page
parent e14feebc
No related branches found
No related tags found
No related merge requests found
......@@ -166,6 +166,9 @@ public class NewControllerFactory {
public boolean launch(UserRequest ureq, WindowControl wControl) {
BusinessControl bc = wControl.getBusinessControl();
ContextEntry mainCe = bc.popLauncherContextEntry();
if(mainCe == null) {
return false;//nothing to launch
}
OLATResourceable ores = mainCe.getOLATResourceable();
// Check for RepositoryEntry resource
......
......@@ -113,8 +113,6 @@ public class AuthenticatedDispatcher implements Dispatcher {
if(log.isDebug()){
log.debug("Bad Request "+request.getPathInfo());
}
DispatcherModule.sendBadRequest(request.getPathInfo(), response);
return;
}
boolean auth = usess.isAuthenticated();
......@@ -193,7 +191,7 @@ public class AuthenticatedDispatcher implements Dispatcher {
} else {
businessPath = extractBusinessPath(ureq, request, uriPrefix);
if(businessPath == null) {
log.error("Invalid URI in AuthenticatedDispatcher: " + request.getRequestURI());
processBusinessPath("", ureq, usess);
} else {
processBusinessPath(businessPath, ureq, usess);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment