Browse files

[JENKINS-14189] don't nest runtimeExceptions in ServletException,

as this break spring-security redirection to login page
  • Loading branch information...
1 parent c062e0f commit c8b1696ece754781a5f578f1316d60867d1ead9d @ndeloof ndeloof committed Dec 14, 2012
View
6 ...ain/java/hudson/plugins/scm_sync_configuration/extensions/ScmSyncConfigurationFilter.java
@@ -42,6 +42,12 @@ public Object call() throws Exception {
return null;
}
});
+ } catch(RuntimeException e){
+ throw e;
+ } catch(ServletException e){
+ throw e;
+ } catch(IOException e){
+ throw e;
} catch(Exception e){
throw new ServletException(e);
}

3 comments on commit c8b1696

@fcamblor
Jenkins member

Is the issue 14189 really in relation to this commit ?
Doesn't seem this is the case.

@ndeloof
Jenkins member

yes, by wrapping RuntimeException in a ServletException, you prevent spring-security filter to catch the invalid credentials and redirect to login form

@fcamblor
Jenkins member

ok thx :-)

Please sign in to comment.