From:
<ji...@ma...> - 2006-11-27 10:32:57
|
[ http://jira.public.thoughtworks.org/browse/CC-525?page=3Dall ] Hack Kampbj=C3=B8rn reassigned CC-525: --------------------------------- Assignee: Hack Kampbj=C3=B8rn > 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, li= bc6 v. 2.3.6, Sun JDK v. 1.5.0_07, Apache Tomcat 5.0.30 with tight security= policy. > Reporter: R. Lemos > Assigned To: Hack Kampbj=C3=B8rn > Priority: Minor > Attachments: getboolean-patch > > Original Estimate: 1 minute > Remaining Estimate: 1 minute > > Acoording to javadoc, the method java.lang.Boolean#getBoolean(String) rec= eive a system property name and returns whether this system property is set= to "true".=20 > The intended result in reporting/jsp/src/net/sourceforge/cruisecontrol/St= atusHelper.java (line 118) and in reporting/jsp/src/net/sourceforge/cruisec= ontrol/taglib/CruiseControlTagSupport.java (line 179) is, instead, that of = java.lang.Boolean#valueOf(String), which parses the String argument and ret= urn whether it is equals to "true". > Patch follows. > []'s > R. Lemos > ----- cut-here ----- > diff -Naur cruisecontrol-2.5-orig/reporting/jsp/src/net/sourceforge/cruis= econtrol/StatusHelper.java cruisecontrol-2.5/reporting/jsp/src/net/sourcefo= rge/cruisecontrol/StatusHelper.java > --- cruisecontrol-2.5-orig/reporting/jsp/src/net/sourceforge/cruisecontro= l/StatusHelper.java 2006-01-22 07:51:08.000000000 -0200 > +++ cruisecontrol-2.5/reporting/jsp/src/net/sourceforge/cruisecontrol/Sta= tusHelper.java 2006-09-27 10:14:53.000000000 -0300 > @@ -115,7 +115,7 @@ > }^M > ^M > public String getCurrentStatus(String singleProject, String logDirPa= th, String projectName, String statusFile) {^M > - boolean isSingleProject =3D Boolean.getBoolean(singleProject);^M > + boolean isSingleProject =3D Boolean.valueOf(singleProject).boole= anValue();^M > ^M > return getCurrentStatus(isSingleProject, logDirPath, projectName= , statusFile);^M > }^M > diff -Naur cruisecontrol-2.5-orig/reporting/jsp/src/net/sourceforge/cruis= econtrol/taglib/CruiseControlTagSupport.java cruisecontrol-2.5/reporting/js= p/src/net/sourceforge/cruisecontrol/taglib/CruiseControlTagSupport.java > --- cruisecontrol-2.5-orig/reporting/jsp/src/net/sourceforge/cruisecontro= l/taglib/CruiseControlTagSupport.java 2006-01-14 06:35:48.000000000 -0200 > +++ cruisecontrol-2.5/reporting/jsp/src/net/sourceforge/cruisecontrol/tag= lib/CruiseControlTagSupport.java 2006-09-27 10:01:28.000000000 -0300 > @@ -176,7 +176,7 @@ > */^M > protected boolean isSingleProject() {^M > String singleProjectMode =3D getContextParam("singleProject");^M > - boolean isSingleProject =3D Boolean.getBoolean(singleProjectMode= );^M > + boolean isSingleProject =3D Boolean.valueOf(singleProjectMode).b= ooleanValue();^M > ^M > return isSingleProject;^M > }^M > ----- cut-here ----- --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://jira.public.thoughtworks.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |