Unexpected output: Affected paths: relative - resubmit patch.
⚙ D457 INP-1851 - Log file upload meta-information as part of the Request Data
Page MenuHomeIn-Portal Phabricator

INP-1851 - Log file upload meta-information as part of the Request Data
ClosedPublic

Authored by alex on Jan 15 2024, 4:08 AM.

Details

Test Plan
  • in the IDE:
    1. open the core/kernel/db/db_event_handler.php file for editing
    2. add the below code at the beginning of the \kDBEventHandler::OnUploadFile method:
$log = $this->Application->log('test message (from upload)', 555);
$log->addRequestData();
$log->setLogLevel(kLogger::LL_ERROR);
$log->write();
  1. save changes
  2. open the modules/in-bulletin/units/polls/poll_eh.php file for editing
  3. add below code at the beginning of the \PollEventHandler::SetCustomQuery method:
$log = $this->Application->log('test message (from grid)', 555);
$log->addRequestData();
$log->setLogLevel(kLogger::LL_ERROR);
$log->write();
    1. save changes
  • in the Admin Console:
    1. go to the Website & ContentPolls section
    2. upload a file
    3. confirm, that file was uploaded to the server
    4. go to the Logs & ReportsSystem Log section
    5. confirm, that only system log messages, described in the test plan, were added since the test started
    6. open the test message (grid) message for editing
    7. confirm, that it contains the following keys in the Request Data array: Headers, _GET, and _COOKIE
    8. close it
    9. open the test message (upload) message for editing
    10. confirm, that it contains the following keys in the Request Data array: Headers, _GET, _POST, _COOKIE, and _FILES
    11. close it

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 1231
Build 1231: arc lint + arc unit

Event Timeline

alex created this revision.Jan 15 2024, 4:08 AM
alex requested review of this revision.Jan 15 2024, 4:08 AM
alex edited the test plan for this revision. (Show Details)Jan 15 2024, 4:09 AM
alex added a project: Restricted Project.Jan 15 2024, 4:28 AM
erik accepted this revision.Jan 15 2024, 4:31 AM
This revision is now accepted and ready to land.Jan 15 2024, 4:31 AM
alex retitled this revision from INP-1851 - Log file upload meta-infomation as part of the Request Data to INP-1851 - Log file upload meta-information as part of the Request Data.Oct 20 2024, 1:09 PM
This revision was automatically updated to reflect the committed changes.