You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@falcon.apache.org by "Venkatesh Seetharam (JIRA)" <ji...@apache.org> on 2014/10/09 01:46:34 UTC

[jira] [Updated] (FALCON-786) FalconAuditFilter - Arguments in wrong order

     [ https://issues.apache.org/jira/browse/FALCON-786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Venkatesh Seetharam updated FALCON-786:
---------------------------------------
    Attachment: FALCON-786.patch

> FalconAuditFilter - Arguments in wrong order 
> ---------------------------------------------
>
>                 Key: FALCON-786
>                 URL: https://issues.apache.org/jira/browse/FALCON-786
>             Project: Falcon
>          Issue Type: Sub-task
>    Affects Versions: 0.6
>            Reporter: Venkatesh Seetharam
>            Assignee: Venkatesh Seetharam
>             Fix For: 0.6
>
>         Attachments: FALCON-786.patch
>
>
> {noformat}
> New defect(s) Reported-by: Coverity Scan
> Showing 1 of 1 defect(s)
> ** CID 64485:  Arguments in wrong order  (SWAPPED_ARGUMENTS)
> ________________________________________________________________________________________________________
> *** CID 64485:  Arguments in wrong order  (SWAPPED_ARGUMENTS)
> /prism/src/main/java/org/apache/falcon/security/FalconAuditFilter.java: 71 in org.apache.falcon.security.FalconAuditFilter.recordAudit(javax.servlet.http.HttpServletRequest, java.lang.String)()
> 65             final String fromAddress = httpRequest.getRemoteAddr();
> 66             final String whatURL = Servlets.getRequestURL(httpRequest);
> 67             final String whatAddrs = httpRequest.getLocalAddr();
> 68
> 69             LOG.debug("Audit: {}/{} performed request {} ({}) at time {}",
> 70                     who, fromAddress, whatURL, whatAddrs, whenISO9601);
> >>>     CID 64485:  Arguments in wrong order  (SWAPPED_ARGUMENTS)
> >>>     The positions of arguments in the call to "audit" do not match the ordering of the parameters:
> * "fromHost" is passed to "remoteAddress"
> * "fromAddress" is passed to "remoteHost"
> 71             GenericAlert.audit(who, fromHost, fromAddress, whatURL, whatAddrs, whenISO9601);
> 72         }
> 73
> 74         private String getUserFromRequest(HttpServletRequest httpRequest) {
> 75             try {
> 76                 // get the authenticated user
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)