Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1714

Randomize names of uploaded files

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: File Uploader, Security
    • Labels:
      None

      Description

      1. add public "\kUploadHelper::randomizeFilename($filename)" method, that will: - 0.5h
        1. generate random 16 byte string using "SecurityGenerator::generateBytes(8)" method call
        2. inject it in here "{file_name}_{random_string}.{file_extension}"
      2. in the "\kUploadHelper::getUploadedFilename" method wrap response with "\kUploadHelper::randomizeFilename" method call - 0.3h
      3. in the "\kUploadFormatter::_processRegularUploader" method, when file was uploaded (the error is UPLOAD_ERR_OK) but before any validation happens wrap "$value['name']" with  "\kUploadHelper::randomizeFilename" method call - 0.2h

      Quote: 1h*1.4=1.5h

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                alex Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

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