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/08 00:28:35 UTC

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

Venkatesh Seetharam created FALCON-786:
------------------------------------------

             Summary: 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
             Fix For: 0.6


{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)