Author: aogburn
Date: 2013-04-26 17:08:54 -0400 (Fri, 26 Apr 2013)
New Revision: 2195
Modified:
branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/realm/RealmBase.java
branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/startup/ContextConfig.java
Log:
[BZ-957256] commit one-off fixes
Modified:
branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/realm/RealmBase.java
===================================================================
---
branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/realm/RealmBase.java 2013-04-26
19:04:52 UTC (rev 2194)
+++
branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/realm/RealmBase.java 2013-04-26
21:08:54 UTC (rev 2195)
@@ -49,7 +49,6 @@
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.core.ContainerBase;
-import org.apache.catalina.deploy.LoginConfig;
import org.apache.catalina.deploy.SecurityCollection;
import org.apache.catalina.deploy.SecurityConstraint;
import org.apache.catalina.util.HexUtils;
@@ -741,31 +740,6 @@
if (constraints == null || constraints.length == 0)
return (true);
- // Specifically allow access to the form login and form error pages
- // and the "j_security_check" action
- LoginConfig config = context.getLoginConfig();
- if ((config != null) &&
- (Constants.FORM_METHOD.equals(config.getAuthMethod()))) {
- String requestURI = request.getRequestPathMB().toString();
- String loginPage = config.getLoginPage();
- if (loginPage.equals(requestURI)) {
- if (log.isDebugEnabled())
- log.debug(" Allow access to login page " + loginPage);
- return (true);
- }
- String errorPage = config.getErrorPage();
- if (errorPage.equals(requestURI)) {
- if (log.isDebugEnabled())
- log.debug(" Allow access to error page " + errorPage);
- return (true);
- }
- if (requestURI.endsWith(Constants.FORM_ACTION)) {
- if (log.isDebugEnabled())
- log.debug(" Allow access to username/password
submission");
- return (true);
- }
- }
-
// Which user principal have we already authenticated?
Principal principal = request.getPrincipal();
boolean status = false;
Modified:
branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/startup/ContextConfig.java
===================================================================
---
branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/startup/ContextConfig.java 2013-04-26
19:04:52 UTC (rev 2194)
+++
branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/startup/ContextConfig.java 2013-04-26
21:08:54 UTC (rev 2195)
@@ -109,13 +109,37 @@
/**
+ * The string resources for this package.
+ */
+ protected static final StringManager sm =
+ StringManager.getManager(Constants.Package);
+
+
+ /**
* The set of Authenticators that we know how to configure. The key is
* the name of the implemented authentication method, and the value is
* the fully qualified Java class name of the corresponding Valve.
*/
protected static Properties authenticators = null;
+ static {
+ // Load our mapping properties
+ authenticators = new Properties();
+ try {
+ InputStream is =
ContextConfig.class.getClassLoader().getResourceAsStream("org/apache/catalina/startup/Authenticators.properties");
+ if (is != null) {
+ authenticators.load(is);
+ } else {
+ log.error(sm.getString(
+ "contextConfig.authenticatorResources"));
+ }
+ } catch (IOException e) {
+ log.error(sm.getString(
+ "contextConfig.authenticatorResources"), e);
+ }
+ }
+
/**
* The Context we are associated with.
*/
@@ -129,13 +153,6 @@
/**
- * The string resources for this package.
- */
- protected static final StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* Deployment count.
*/
protected static long deploymentCount = 0L;
@@ -276,26 +293,6 @@
customAuthenticators.get(loginConfig.getAuthMethod());
}
if (authenticator == null) {
- // Load our mapping properties if necessary
- if (authenticators == null) {
- try {
- InputStream
is=this.getClass().getClassLoader().getResourceAsStream("org/apache/catalina/startup/Authenticators.properties");
- if( is!=null ) {
- authenticators = new Properties();
- authenticators.load(is);
- } else {
- log.error(sm.getString(
- "contextConfig.authenticatorResources"));
- ok=false;
- return;
- }
- } catch (IOException e) {
- log.error(sm.getString(
- "contextConfig.authenticatorResources"), e);
- ok = false;
- return;
- }
- }
// Identify the class name of the Valve we should configure
String authenticatorName = null;
Show replies by date