Skip to content

Commit

Permalink
62104: Fix programmatic login regression as the NonLoginAuthenticator…
Browse files Browse the repository at this point in the history
… has to be set for it to work (if no login method is specified).

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1824323 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
rmaucher committed Feb 15, 2018
1 parent 68f6c47 commit 4d637bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
18 changes: 5 additions & 13 deletions java/org/apache/catalina/startup/ContextConfig.java
Expand Up @@ -342,19 +342,11 @@ protected void applicationAnnotationsConfig() {
protected void authenticatorConfig() {

LoginConfig loginConfig = context.getLoginConfig();

SecurityConstraint constraints[] = context.findConstraints();
if ((constraints == null || constraints.length ==0) &&
!context.getPreemptiveAuthentication()) {
// No need for an authenticator
return;
} else {
if (loginConfig == null) {
// Security constraints present. Need an authenticator to
// support them.
loginConfig = DUMMY_LOGIN_CONFIG;
context.setLoginConfig(loginConfig);
}
if (loginConfig == null) {
// Security constraints present. Need an authenticator to
// support them.
loginConfig = DUMMY_LOGIN_CONFIG;
context.setLoginConfig(loginConfig);
}

// Has an authenticator been configured already?
Expand Down
5 changes: 5 additions & 0 deletions webapps/docs/changelog.xml
Expand Up @@ -65,6 +65,11 @@
compressed with brotli compression. Based on a patch provided by burka.
(markt)
</fix>
<fix>
<bug>62104</bug>: Fix programmatic login regression as the
NonLoginAuthenticator has to be set for it to work (if no login method
is specified). (remm)
</fix>
</changelog>
</subsection>
<subsection name="Coyote">
Expand Down

0 comments on commit 4d637bc

Please sign in to comment.