Bug #77372 [NEW]: Relative file path is removed from uploaded file

From: Date: Sat, 29 Dec 2018 22:49:28 +0000
Subject: Bug #77372 [NEW]: Relative file path is removed from uploaded file
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218675@lists.php.net to get a copy of this message
From: nospam at unclassified dot de Operating system: Windows 10 PHP version: 7.0.33 Package: *Directory/Filesystem functions Bug Type: Bug Bug description:Relative file path is removed from uploaded file Description: ------------ <input type="file" name="files" multiple webkitdirectory> This allows the user to select a directory and have all its files uploaded, also from all subdirectories. In Firefox, the POST request correctly contains the relative paths of all uploaded files. In PHP, the paths are removed and only the file names are available. $_FILES['files']['name'][...]: Actual value: 'file.png' Expected value: 'sub/dir/file.png' This makes the entire directory uploading feature unusable because the structure gets lost and file names may even become duplicate and useless. Note, I have searches for "upload webkitdirectory" but only got tons of unrelated results, so I might have missed a real duplicate. Please improve your search if you want to avoid duplicates. Test script: --------------- See above. Expected result: ---------------- See above. Actual result: -------------- See above. -- Edit bug report at https://bugs.php.net/bug.php?id=77372&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77372&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77372&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77372&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77372&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77372&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77372&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77372&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77372&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77372&r=support Expected behavior: https://bugs.php.net/fix.php?id=77372&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77372&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77372&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77372&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77372&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77372&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77372&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77372&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77372&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77372&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77372&r=mysqlcfg

« previous php.bugs (#218675) next »