Uploaded image for project: 'Hadoop Distributed Data Store'
  1. Hadoop Distributed Data Store
  2. HDDS-2110

Arbitrary file can be downloaded with the help of ProfilerServlet

    XMLWordPrintableJSON

    Details

      Description

      The LOC 324 in the file ProfileServlet.java is prone to an arbitrary file download:-

      protected void doGetDownload(String fileName, final HttpServletRequest req,      final HttpServletResponse resp) throws IOException {
      
      File requestedFile = ProfileServlet.OUTPUT_DIR.resolve(fileName).toAbsolutePath().toFile();

      As the String fileName is directly considered as the requested file.

       

      Which is called at LOC 180 with HTTP request directly passed:-

      if (req.getParameter("file") != null) {      doGetDownload(req.getParameter("file"), req, resp);      
      return;    
      }
      

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                elek Marton Elek
                Reporter:
                adeo Aayush
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h