ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Le Roux (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-9973) [FB] Find Security Bugs
Date Thu, 09 Nov 2017 08:57:00 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-9973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16245393#comment-16245393
] 

Jacques Le Roux commented on OFBIZ-9973:
----------------------------------------

At revision: 1814709  in trunk and r1814710 in R16.11 I slighlty improved (not sure it has
really an impact but was pressed by FB ;))

I missed to encode the request parameter prior to use the canonical pathname.
Nevertheless Findbugs continues to complains about missing canonical pathname
I tried 
{code}
String safePath = (new File(imageServerPath + "/" + productId + "/" + imageName)).getCanonicalPath();
BufferedImage bufImg1 = ImageIO.read(FileUtil.getFile(safePath));
{code}
instead of
{code}
BufferedImage bufImg1 = ImageIO.read(new File(imageServerPath + "/" + productId + "/" + imageName).getCanonicalFile());
{code}
Same Findbugs report, I consider it's a false positive and keep the simpler later


> [FB] Find Security Bugs
> -----------------------
>
>                 Key: OFBIZ-9973
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9973
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: marketing, product
>    Affects Versions: Trunk, Release Branch 16.11
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>
> I recently [found|https://www.ysofters.com/2015/08/31/taint-analysis-added-to-findbugs/]
FindBugs embeds an option [to Find Security Bugs|https://find-sec-bugs.github.io/]:
> I have tried this option: https://github.com/find-sec-bugs/find-sec-bugs/wiki/Eclipse-Tutorial
> Also later we should remember of OFBIZ-7963 and if possible run this tool in [Builbot
using Gradle|https://search.maven.org/#search|gav|1|g:%22com.h3xstream.findsecbugs%22%20AND%20a:%22findsecbugs-plugin%22]
(did not check feasibility)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message