Uploaded image for project: 'Falcon'
  1. Falcon
  2. FALCON-685 All actions by user must be audited
  3. FALCON-786

FalconAuditFilter - Arguments in wrong order

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.6
    • 0.6
    • None
    • None

    Description

      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
      

      Attachments

        1. FALCON-786.patch
          1 kB
          Venkatesh Seetharam

        Activity

          People

            svenkat Venkatesh Seetharam
            svenkat Venkatesh Seetharam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: