Author: jonesde
Date: Thu Feb 12 18:15:35 2009 New Revision: 743822 URL: http://svn.apache.org/viewvc?rev=743822&view=rev Log: Fixed bug when there is not security element, certain values were not getting initialized; also fixed bug caused when default-request is not specified Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java?rev=743822&r1=743821&r2=743822&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java Thu Feb 12 18:15:35 2009 @@ -356,26 +356,21 @@ public static class RequestMap { public String uri; - public boolean edit; - public boolean trackVisit; - public boolean trackServerHit; + public boolean edit = true; + public boolean trackVisit = true; + public boolean trackServerHit = true; public String description; public Event event; - public boolean securityHttps; - public boolean securityAuth; - public boolean securityCert; - public boolean securityExternalView; - public boolean securityDirectRequest; + public boolean securityHttps = false; + public boolean securityAuth = false; + public boolean securityCert = false; + public boolean securityExternalView = true; + public boolean securityDirectRequest = true; public Map<String, RequestResponse> requestResponseMap = FastMap.newInstance(); - /* - public static final String ERROR_PAGE_DEFAULT = "error"; - public static final String NEXT_PAGE_DEFAULT = "success"; - */ - public RequestMap(Element requestMapElement) { // Get the URI info @@ -415,7 +410,7 @@ public String type; public String path; public String invoke; - public boolean globalTransaction; + public boolean globalTransaction = true; public Event(Element eventElement) { this.type = eventElement.getAttribute("type"); Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=743822&r1=743821&r2=743822&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Thu Feb 12 18:15:35 2009 @@ -155,7 +155,7 @@ // Check to make sure we are allowed to access this request directly. (Also checks if this request is defined.) // If the request cannot be called, or is not defined, check and see if there is a default-request we an process - if (!requestMap.securityDirectRequest) { + if (!requestMap.securityDirectRequest && controllerConfig.defaultRequest != null) { if (!controllerConfig.requestMapMap.get(controllerConfig.defaultRequest).securityDirectRequest) { // use the same message as if it was missing for security reasons, ie so can't tell if it is missing or direct request is not allowed throw new RequestHandlerException(requestMissingErrorMessage); |
Free forum by Nabble | Edit this page |