From: R. L. (JIRA) <ji...@ma...> - 2006-11-27 10:28:57
|
[ http://jira.public.thoughtworks.org/browse/CC-525?page=comments#action_13689 ] R. Lemos commented on CC-525: ----------------------------- I can't believe that such a bug is still lying around. The correction is so straight forward... and the patch is already attached... and is so simple to inspect it... it would take no longer than a minute to understand the patch and review the API docs. > Taglib tries to read a system property named "false", which, depending on security policies, may be denied > ---------------------------------------------------------------------------------------------------------- > > Key: CC-525 > URL: http://jira.public.thoughtworks.org/browse/CC-525 > Project: CruiseControl > Issue Type: Bug > Components: Reporting Application > Affects Versions: 2.5 > Environment: Debian GNU/Linux, kernel 2.6.15-1-686-smp #2 SMP, libc6 v. 2.3.6, Sun JDK v. 1.5.0_07, Apache Tomcat 5.0.30 with tight security policy. > Reporter: R. Lemos > Priority: Minor > Attachments: getboolean-patch > > Original Estimate: 1 minute > Remaining Estimate: 1 minute > > Acoording to javadoc, the method java.lang.Boolean#getBoolean(String) receive a system property name and returns whether this system property is set to "true". > The intended result in reporting/jsp/src/net/sourceforge/cruisecontrol/StatusHelper.java (line 118) and in reporting/jsp/src/net/sourceforge/cruisecontrol/taglib/CruiseControlTagSupport.java (line 179) is, instead, that of java.lang.Boolean#valueOf(String), which parses the String argument and return whether it is equals to "true". > Patch follows. > []'s > R. Lemos > ----- cut-here ----- > diff -Naur cruisecontrol-2.5-orig/reporting/jsp/src/net/sourceforge/cruisecontrol/StatusHelper.java cruisecontrol-2.5/reporting/jsp/src/net/sourceforge/cruisecontrol/StatusHelper.java > --- cruisecontrol-2.5-orig/reporting/jsp/src/net/sourceforge/cruisecontrol/StatusHelper.java 2006-01-22 07:51:08.000000000 -0200 > +++ cruisecontrol-2.5/reporting/jsp/src/net/sourceforge/cruisecontrol/StatusHelper.java 2006-09-27 10:14:53.000000000 -0300 > @@ -115,7 +115,7 @@ > }^M > ^M > public String getCurrentStatus(String singleProject, String logDirPath, String projectName, String statusFile) {^M > - boolean isSingleProject = Boolean.getBoolean(singleProject);^M > + boolean isSingleProject = Boolean.valueOf(singleProject).booleanValue();^M > ^M > return getCurrentStatus(isSingleProject, logDirPath, projectName, statusFile);^M > }^M > diff -Naur cruisecontrol-2.5-orig/reporting/jsp/src/net/sourceforge/cruisecontrol/taglib/CruiseControlTagSupport.java cruisecontrol-2.5/reporting/jsp/src/net/sourceforge/cruisecontrol/taglib/CruiseControlTagSupport.java > --- cruisecontrol-2.5-orig/reporting/jsp/src/net/sourceforge/cruisecontrol/taglib/CruiseControlTagSupport.java 2006-01-14 06:35:48.000000000 -0200 > +++ cruisecontrol-2.5/reporting/jsp/src/net/sourceforge/cruisecontrol/taglib/CruiseControlTagSupport.java 2006-09-27 10:01:28.000000000 -0300 > @@ -176,7 +176,7 @@ > */^M > protected boolean isSingleProject() {^M > String singleProjectMode = getContextParam("singleProject");^M > - boolean isSingleProject = Boolean.getBoolean(singleProjectMode);^M > + boolean isSingleProject = Boolean.valueOf(singleProjectMode).booleanValue();^M > ^M > return isSingleProject;^M > }^M > ----- cut-here ----- -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.public.thoughtworks.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |