18 Commits

Author SHA1 Message Date
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
nao-pon b0e72af973 [php:session] fix #3278 wrong code of typo 2021-06-11 16:42:03 +09:00
nao-pon 357bc43824 [php:session] fix #3103 WARNING: setcookie(): Unrecognized key 'lifetime'
It is re-patch to fix #3130. see #3130.
2020-03-16 23:14:38 +09:00
nao-pon 30998556dc [php:session] re. fix #2857 warning error on start() 2020-02-01 20:24:14 +09:00
nao-pon bd98e9c5eb [php:session] fix #3103 WARNING: setcookie(): Unrecognized key 'lifetime' 2020-02-01 17:45:40 +09:00
nao-pon fbeb1015e1 [php:session] fix #3017 param "SameSite=None" support for CORS
Allow arbitrary parameters to be added to the cookie in order to be able
to set the “SameSite=None” parameter that will be required by CORS.

```php
// session options
$sessopts = array();
// Add 'SameSite=None' but exclude WebKit
// see https://bugs.webkit.org/show_bug.cgi?id=198181
if (empty($_SERVER['HTTP_USER_AGENT']) || !preg_match('/(?:(?:iPhone
OS|iPad; CPU OS) 1[0-2]|Mac OS X.*Version\/1[0-2].*Safari)/',
$_SERVER['HTTP_USER_AGENT'])) {
    $sessopts['cookieParams'] = array('SameSite' => 'None');
}

// elFinder options
$opts = array(
    'roots'  => array(
        array(
            'driver' => 'LocalFileSystem',
            'path'   => '/path/to/files/',
            'URL'    => 'http://localhost/to/files/',
            'session' => new elFinderSession($sessopts)
        )
    )
);

// run elFinder
$connector = new elFinderConnector(new elFinder($opts));
$connector->run();
```
2019-10-21 23:10:40 +09:00
nao-pon 1e725d2115 [php:session] fix #2857 consideration for environment other than "apache2 SAPI" 2019-02-18 20:39:33 +09:00
nao-pon 15cc46ea27 [php] change code style to PSR-2 of all of php files 2019-01-01 21:18:39 +09:00
nao-pon f05d2ed174 [php:session] use PHP system settings of the session cookie 2018-12-14 17:13:28 +09:00
nao-pon e449a7b37c [php:session] prevent duplicate registration of "Set-Cookie" header 2018-12-14 00:24:59 +09:00
nao-pon 969c5f7614 Revert "[php:session] optimize session write function"
This reverts commit da0ee16b27.
2017-04-25 19:57:48 +09:00
nao-pon da0ee16b27 [php:session] optimize session write function 2016-12-11 23:24:07 +09:00
nao-pon e88048a205 [php] add PHP error handler and remove @ error-control operator 2016-05-13 17:13:31 +09:00
nao-pon 32f01e0d3a [Session] fix problem of remove method 2016-03-23 17:21:42 +09:00
Naoki Sawada 32888cc397 [php:session] elFinder need session restart
elFinder must be equipped with the session restart for multi-connection correspondence.
2016-03-16 23:22:09 +09:00
Jonas Schürmann 673b0bebc1 elFinderSession: Only start session if it isn't already running 2016-03-16 14:01:18 +01:00
nao-pon 3a6459c555 [elFinderSession] private property $started to protected 2016-02-28 15:50:52 +09:00
nao-pon 78452f3429 [php] session handling wrapper replaceable 2016-02-28 14:15:36 +09:00