660 Commits

Author SHA1 Message Date
nao-pon be9ce70ac9 Normalize MPD text/xml MIME type 2026-04-29 21:36:22 +09:00
nao-pon 82a4f2d98a Merge branch 'master' of github.com:Studio-42/elFinder 2026-04-18 01:22:15 +09:00
nao-pon 047afabbef fix(mime): normalize MIME mappings and regenerate elFinder.mimetypes.js
Fixes #3736
2026-04-18 01:19:49 +09:00
Anton Kudriashov 2ce950f210 Fix incorrect URL generation in getContentUrl() (#3759)
trim($this->root, '/') strips the leading slash from the root path,
making strlen() return a value 1 less than expected. This causes
substr() to include an extra character from the root folder name
in the relative path.

For example, with root folder "images":
- Expected URL: /files/image.jpg
- Actual URL:   /files/s/image.jpg

Using strlen($this->root) + 1 is consistent with other URL
construction methods in elFinderVolumeLocalFileSystem (lines 206,
612, 845, 1420) which all use this correct pattern.

Fixes #3746
2026-04-17 21:08:04 +09:00
Naoki Sawada bf02465a19 Merge commit from fork 2026-04-17 11:33:38 +09:00
Kevin Wydler a560291043 Fix CVE-2025-0818 (#3723)
* CVE-2025-0818 (Part 1)
- Fixed arbitrary file delete by prepending the tempath to the global temp file array paths before deleting them

- This also required a new global array (elFinderAbortFiles) because the temp path could be different depeing on the configuration of elFInder.

- Removed the ability of getTempPath() to return the writableTmb path because this would unnecessarly complicate things when checking the path before deletion

* CVE-2025-0818 (Part II)
- Prevented arbitrary file read by prepending the common temp directory to the extracted onetime file path of the 'file' commands 'ontime' function.

- Prevented directory traversal and the general use of paths by using basename() for the appended file name.

- This patch currently prevents arbitrary file reads and deletes. However, it still allows this for files in the .tmp directory. This should also at least be mitigated.
2025-08-28 19:53:03 +09:00
nao-pon 7544918a2b [VD:core] Check if copying was successful when moving files in copy + delete mode
ref.
https://github.com/Studio-42/elFinder/commit/071b5ab33ce3583a1f57fa140a6f0b4e3ef12550#commitcomment-149967981
2024-12-05 21:55:50 +09:00
nao-pon 7084b550a7 Fix #3667 where the Content URL could be invalid 2024-12-04 00:45:25 +09:00
terrafrost 071b5ab33c try copy / deleting folder if moving it doesn't work 2024-05-21 08:52:23 -05:00
nao-pon bb8c8dc1d8 [VD:core] fix #3617 Filename Restriction Bypass Leading To Persistent Cross-site Scripting Vulnerability 2023-12-20 09:42:02 +09:00
nao-pon d2fce10a6a [VD:LocalFileSystem] fix #3615 Using .php8 in PHP handler leading to RCE 2023-12-19 23:57:28 +09:00
nao-pon 3b75849553 [security:CVE-2022-26960] fix a path traversal issue
Fixed a paste traversal vulnerability. The problem was getting out of
the configured directory and allowing the hosting server's file system
to read and write "arbitrary" files.

Special thanks to Gaetan Ferry (Synacktiv) for reporting this issue.
2022-03-14 20:59:19 +09:00
nao-pon 8e2fa59c45 [php:core,VD:abstract] fix #3370 broken PHP 5.3 compat 2021-07-07 23:57:12 +09:00
Naoki Sawada a106c350b7 Merge pull request from GHSA-wph3-44rj-92pr
* [php] fix multiple vulnerabilities

* fix archiver args

* fix remote Code Execution of zip command

* re-fix remote Code Execution of zip command

* re-fix Improper hostname validation in upload and put

* re-fix Directory traversal in the actions mkfile and mkdir

* Add check targets in archive()
2021-06-13 23:38:02 +09:00
nao-pon b40fcb8ca1 [VD:abstract] fix #3216 missing url option on upload into root 2021-06-13 11:34:08 +09:00
Billy Noah 398d29ce67 [VD:abstract] bugfix of an option mimeDetect (#3291)
Rewrite logic for to get mimeDetect for clarity and to resolve a small bug.

This line causes a bug where it becomes impossible to set mimeDetect to 'mime_content_type': https://github.com/Studio-42/elFinder/blob/33eea861cb07196edbde5d9188f65a6ce81be21f/php/elFinderVolumeDriver.class.php#L1290

The logic here first makes an array of methods available in the current environment.  Then we check to see if the type set is among them.  If not, set to auto.  If set to auto, shift the first element from available types.
2021-06-08 18:04:46 +09:00
Stanimir Stoyanov f6db283def [php:core] Add cwd param to proc_open (#3281) 2021-06-08 17:52:03 +09:00
nao-pon b13f09b1bd [VD:abstract] fix #3181 add an option uploadMaxMkdirs
that Maximum number of folders that can be created at one time. (0:
unlimited)
2021-06-02 23:34:02 +09:00
nao-pon 75ea92decc [VD:abstract] add 'phar:*' => 'text/x-php' into 'staticMineMap'
rel. #3295
2021-05-31 20:50:39 +09:00
f2h2h1 451697c9e8 [VD:abstract,php] make the thumbnail support webp (#3265)
* make the thumbnail support webp

* Fix syntax errors

* check 'imagecreatefromwebp' by function_exists

Co-authored-by: lqt <805799838@qq.com>
Co-authored-by: Naoki Sawada <hypweb+github@gmail.com>
2021-03-10 21:05:53 +09:00
nao-pon c4ab070ca8 [VD:abstract] fix #3151 support RAR5 lib 2020-07-21 21:58:06 +09:00
nao-pon 04720e4946 [VD:abstract] fix #3167 added "none" (no image library check) to imgLib option value 2020-06-01 00:12:29 +09:00
nao-pon 410949c769 [VD:abstract] fix #3161 fix option data of cwd results on after change files 2020-05-31 00:12:42 +09:00
nao-pon 37519c120f [VD:abstract,LocalFileSystem] use symlink to getItemsInHand() 2020-04-10 17:35:21 +09:00
nao-pon 543eb67557 [VD:abstract] change prefix of zipdl temp file 2020-03-29 11:47:54 +09:00
nao-pon d868e52331 [VD:abstract] fix #3125 Fatal error in zipArchiveUnzip() 2020-03-15 15:54:58 +09:00
nao-pon d0fb5d7fd9 [VD:abstract] sanitize Illegal characters of file system in getItemsInHand() 2020-03-11 11:25:46 +09:00
nao-pon d122437701 [VD:abstract] mimetype() file check only of elFinderVolumeLocalFileSystem instance 2020-03-05 11:04:30 +09:00
nao-pon e319b86c19 Revert "[VD:abstract,GoogleDrive] isNameExists() support filename with "/""
This reverts commit a50b9b761a.
2020-03-04 09:21:10 +09:00
nao-pon a50b9b761a [VD:abstract,GoogleDrive] isNameExists() support filename with "/" 2020-03-04 00:30:12 +09:00
nao-pon 08300ac5f1 [php:core] fix #3120 allow plugins (Sanitizer etc) to be applied when pasting from another volume 2020-03-03 15:38:01 +09:00
nao-pon 55a967b94a [php:core,VD] fix #3119 disallow extract of uncompressed size larger than option "maxArcFilesSize" 2020-02-28 00:15:46 +09:00
nao-pon 79a838be29 [php] fix #3114 stream proxy function using the file cmd corresponds to range request 2020-02-23 18:26:37 +09:00
nao-pon fefd70c135 [VD:abstract] change default value of onetimeUrl to 'auto' 2020-02-18 16:46:03 +09:00
nao-pon f692d26744 [VD:abstract:getContentUrl] if exist it, reuse the temporary file for link 2020-02-13 17:15:20 +09:00
nao-pon 5eade634a1 [VD:abstract] fix #3104 fix as much as possible the differences in encoding of archive file names 2020-02-06 23:03:04 +09:00
nao-pon 1570a9aa66 [cmd:resize] to allow image resize more image type with the ImageMagick 2020-01-28 17:34:29 +09:00
nao-pon 5bf5739bb5 [VD:abstract] fix #3097 "Unable to create archive" error deletes target files
This bug is enbug via commit 3527c2a1af .
2020-01-24 11:49:24 +09:00
nao-pon 0451615ebe [VD:abstract] support file extention "dds" as "image/vnd-ms.dds" 2020-01-23 17:23:54 +09:00
nao-pon 32b290ce3c [VD:abstract] mask iconv notice error in convEnc() 2020-01-22 17:18:21 +09:00
nao-pon 449d209e5a [php:core] elFinderVolumeDriver::procExec() move to elFinder:: as public static function 2020-01-20 16:18:16 +09:00
nao-pon c87286350d [VD:abstract] tiny performance tune of canCreateTmb() 2020-01-17 01:25:02 +09:00
nao-pon 56c8dac4ab [VD:abstract] fix judgement of tmb GC 2020-01-17 01:15:43 +09:00
nao-pon 2119c6466b [VD:abstract] fix warnning error of mount() 2020-01-12 18:57:27 +09:00
nao-pon b1d770a0c8 [cmd:rename] save renamed name to session data as alias of netmount volume root 2020-01-10 21:31:55 +09:00
nao-pon 2af3bdbecc [php:core,VD] fix enbug of dc614fc705
rel. #3077
2020-01-10 15:25:32 +09:00
nao-pon dc614fc705 [VD] more faster with "rapidRootStat" - rel #3077 2020-01-10 11:38:26 +09:00
nao-pon bea656f8ec [VD] fix error handling when authentication fails 2020-01-10 01:23:56 +09:00
nao-pon bb5e8af3ef [VD:abstract] bugfix of tmb garbage collection, time is wrong 2020-01-09 11:50:20 +09:00
nao-pon 0d1070c94a [VD:abstract] check uploadMaxSize also in copyFrom() 2020-01-09 00:26:48 +09:00