about summary refs log tree commit diff
path: root/sourcecodes/bn_after_upload_gom.php
AgeCommit message (Collapse)Author
13 daysFix undefined $TextinFile/$keyval in bn_after_upload_gom.phpClaude Sonnet 5
$TextinFile was passed to move_uploaded_file() as its $to argument, but its assignment (and the $keyval/$sid/$dir it depends on) was commented out, so $TextinFile was always null/undefined here -- an upload through this page could never succeed even on PHP 7.4, and on PHP 8.1+ it also triggers "Passing null to parameter #1 ($to)... is deprecated". $keyval was similarly used (e.g. in the hidden My_key form field) before it was ever assigned, causing an "Undefined variable" warning that could leak into an unquoted HTML attribute if display_errors is on. Unlike bn_file_load_gom.php (a fresh-upload entry point that mints a new random key), this page is only reached via a redirect from modify_structure_learning.php with an existing My_key already in the query string. Restored the commented-out block, adapted to read $keyval from $_GET (matching how the rest of this file already does it further down) instead of generating a new one, so $TextinFile is a real path before the upload block runs. Verified empirically against PHP 8.3.28: simulating an upload request now correctly reaches move_uploaded_file() with a real path and falls into the file's own pre-existing "Sorry, error uploading" handling instead of silently failing on a null argument. Reviewed by: Frederick M Muriithi <fredmanglis@gmail.com>
2021-02-24Update bn_after_upload_gom.phpziejd2
2021-02-24Moving final GENENET8 version to masterziejd2
2021-02-24GENENET8 updateziejd2
2019-01-28Jan 28 2019 updateziejd2