1814 Commits

Author SHA1 Message Date
nao-pon e311a7db22 elFinder version 2.1.69 2026-05-07 21:52:56 +09:00
nao-pon 0fadad49b4 elFinder version 2.1.68 2026-05-07 17:19:02 +09:00
Naoki Sawada 6f7593fcac Merge commit from fork 2026-05-07 16:45:04 +09:00
nao-pon 0dfa4fc979 Merge branch 'master' of github.com:Studio-42/elFinder 2026-05-07 11:01:46 +09:00
nao-pon ea1a352fb9 fix(connector): normalize PHP error handling and mount failures 2026-05-07 10:37:04 +09:00
nao-pon be9ce70ac9 Normalize MPD text/xml MIME type 2026-04-29 21:36:22 +09:00
nao-pon da8300b5af fix:#3782 avoid E_STRICT on PHP 8.4+ 2026-04-27 23:32:58 +09:00
nao-pon 6c929d8941 Preserve i18n keys in mount errors 2026-04-24 22:59:02 +09:00
nao-pon 3909861f64 fix(onedrive): prefer cached Graph download URLs for file access
Fixes #3722

Use @microsoft.graph.downloadUrl for OneDrive file access and
fall back to the /content redirect when needed.

Reuse cached download URLs when available, and update the cache
only when a full stat entry already exists.
2026-04-23 16:04:53 +09:00
nao-pon 11b5e6b82d fix(connector): refine CSRF token refresh timing and protected commands
- refresh CSRF TTL after successful open/info/protected commands
- extend token lifetime on open requests during normal navigation
- limit CSRF protection to stable write commands
- fix callback script syntax in OAuth popup handling
2026-04-21 18:11:59 +09:00
nao-pon 633e82a94b fix(connector): add CSRF token validation and refresh flow
- issue CSRF token on open init response
- send token via custom request header
- validate token for protected write commands
- refresh token TTL on info reload and valid protected requests
- return csrfReload marker on 403 to trigger background token refresh
- suppress duplicate CSRF refresh requests on the client
2026-04-21 11:32:52 +09:00
nao-pon 63369c6afe feat(editor): add signed callback state storage for external save handlers 2026-04-21 00:10:12 +09:00
Naoki Sawada 2a860167b8 fix: improve PHP 8 compatibility in session, cURL, and callback handling (#3780)
- replace curl_close() handling for PHP 8 CurlHandle compatibility
- refine session cookie params and read-only session behavior
- change session get() default fallback from '' to null
- improve OAuth callback window close/message fallback
- add type-safe adjustments in watermark processing
2026-04-20 10:28:31 +09:00
ctrlaltca 33201ec1d2 Correctly urlencode path in setcookie(); fix Studio-42#3538 (#3754)
Some characters are valid in URLs but not in cookies, eg. comma or semicolon.
They needs to be encoded properly.
2026-04-18 10:00:02 +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
colemanw 44aa9331ce Update deprecated php type casts (#3739)
In PHP 8.5, non-canonical scalar type casts (boolean|double|integer|binary) deprecated.

See https://php.watch/versions/8.5/boolean-double-integer-binary-casts-deprecated.
2026-04-17 21:37:45 +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
Andres Rosado ecdc053963 Fixing bug where uploading large files sometimes fails (#3761)
Sometimes uploading large files fails with the following error: Unsupported operand types: string + int {"userId":2,"exception":"[object] (TypeError(code: 0): Unsupported operand types: string + int at <path>/vendor/studio-42/elfinder/php/elFinder.php:4476). 

The function file_get_contents returns a string, and PHP 8 doesn't do implicit conversion. It requires the conversion to be explicit to not give problems.
2026-04-17 19:57:09 +09:00
nao-pon 162bff682d elFinder version 2.1.67 2026-04-17 11:44:14 +09:00
Naoki Sawada bf02465a19 Merge commit from fork 2026-04-17 11:33:38 +09:00
nao-pon 3d4e9883dc elFinder version 2.1.66 2025-08-28 20:50:27 +09:00
Jesper Noordsij 2d718b5d0f Replace usage of deprecated E_STRICT constant (#3705)
* Replace usage of deprecated E_STRICT constant

* Remove trailing whitespace
2025-08-28 20:11:33 +09:00
Andre Wachsmuth 9022cc8143 Ignore posted message that are not intended for ElFinder (#3692)
https://github.com/Studio-42/elFinder/issues/3432

Co-authored-by: Andre Wachsmuth <awa@xima.de>
2025-08-28 20:02:59 +09:00
sitecode 4488b03944 [VD:SFTP] Make compatible with phpseclib version 2 or 3 when returned from connectCallback($options) (#3687) 2025-08-28 20:00:13 +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
nao-pon 6bd50c285c [OneDrive] fix Content URL 2024-12-04 00:41:19 +09:00
nao-pon 6c62ab8e0b Fix #3637 FILTER_SANITIZE_STRING is deprecated (PHP 8.1) 2024-09-26 17:54:37 +09:00
terrafrost 071b5ab33c try copy / deleting folder if moving it doesn't work 2024-05-21 08:52:23 -05:00
Ayesh Karunaratne 3df8f949d7 [PHP 8.4] Fix: Curl CURLOPT_BINARYTRANSFER deprecated
The `CURLOPT_BINARYTRANSFER` PHP constant from the Curl extension was no-op since
PHP 5.1, and is deprecated in PHP 8.4. This removes the constant usage to avoid
the deprecation notice in PHP 8.4 and later.

Because this constant was no-op since PHP 5.1 (circa 2005), this change has no
impact.

See:

 - [PHP.Watch - PHP 8.4 - Curl: CURLOPT_BINARYTRANSFER deprecated](https://php.watch/versions/8.4/CURLOPT_BINARYTRANSFER-deprecated)
 - [commit](https://github.com/php/php-src/commit/fc16285538e96ecb35d017231051f83dcbd8b55b)
2024-01-16 22:44:54 +07:00
nao-pon 1ad203a186 elFinder version 2.1.65 2024-01-05 14:00:53 +09:00
nao-pon caf636b084 [php:editors] Zoho API update 2023-12-22 00:05:07 +09:00
nao-pon c615f814fc elFinder version 2.1.64 2023-12-20 16:42:23 +09:00
nao-pon a54337c675 elFinder version 2.1.63 2023-12-20 11:33:38 +09:00
Nounours13 443f7e414e Update elFinder.class.php (#3619)
When you download a file via context menu the windows download popup don't close
2023-12-20 10:51:33 +09:00
adamvalalsky 04c5d67479 Use prepared statements instead of escaping when saving file (#3604)
Co-authored-by: Adam Valalský <adam.valalsky@nubium.cz>
2023-12-20 10:07:51 +09: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 ba48342df1 elFinder version 2.1.62 2023-06-14 01:38:19 +09:00
nao-pon ff45de6868 Merge branch 'master' of github.com:Studio-42/elFinder 2023-06-12 20:32:52 +09:00
sitecode dc9bcd17c9 [VD:SFTP] fix SFTP driver fatal error, cleanup (#3574)
Fix PHP 8 fatal error: 0 - preg_split(): Argument #2 ($subject) must be of type string, array given
Cleanup: delete unused code and replace confusing var name $raw with $info to clarify working with an array and not a string.
2023-06-12 20:29:59 +09:00
nao-pon 099803dabf [php:core] fix #3546 Use elFinder::getCmdOfBind instead of self::getCmdOfBind which is deprecated in PHP v8.2 2023-06-03 21:22:48 +09:00
nao-pon 28a04a419a [VD:LocalFileSystem] fix #3543 Can't download folder in PHP 8.1 2023-06-02 17:05:47 +09:00
nao-pon e9761f3d4f Merge branch 'master' of github.com:Studio-42/elFinder 2023-06-02 14:27:52 +09:00
ctrlaltca 34dcd44121 Correctly urlencode path in setcookie(); fix #3538 (#3561)
Some characters are valid in URLs but not in cookies, eg. comma or semicolon.
They needs to be encoded properly.
2023-06-02 09:21:06 +09:00
Neuza ca888c167a Update elFinderVolumeSFTPphpseclib.class.php (#3556) 2023-06-02 09:19:55 +09:00
nao-pon bb9aaa7b09 [VD:LocalFileSystem] Security fixes, directory traversal vulnerability
fixes

This issue was found by Michał Majchrowicz & Livio Victoriano AFINE
Team. We give them a special thanks.
2023-06-02 00:04:05 +09:00
Colin 6565c345b8 [mime.types] Update mime.types to allow MS outlook message files (#3499)
Adding application/vnd.ms-outlook mimetype with .msg extension
2022-08-26 18:05:14 +09:00