Commit Graph

917 Commits

Author SHA1 Message Date
杨晶旭
7ff516063d Fix #18160, fix #18192: Fixed registerFile with argument depends set does not use the position and appendTimestamp argument, also modify the unit view 2020-10-11 15:03:12 +03:00
Walid Said
3dabcdb6ab Fix #18313: Fix multipart form data parse with double quotes 2020-10-05 13:08:32 +03:00
Tobias Munk
88e79d3f8e Fix #18290: Fix response with non-seekable streams 2020-10-02 11:48:02 +03:00
My6UoT9
03da5bb689 Updates to ErrorHandler, add missing type hint \Throwable (#18302)
* Updated phpdoc so it has \Throwable

- `abstract protected function renderException($exception);` is extended in web/ErrorHandler to also have `\Error`.
- `public static function convertExceptionToError($exception)` is called from widgets/ActiveField.php with 
```
/**
     * PHP magic method that returns the string representation of this object.
     * @return string the string representation of this object.
     */
    public function __toString()
    {
        // __toString cannot throw exception
        // use trigger_error to bypass this limitation
        try {
            return $this->render();
        } catch (\Exception $e) {
            ErrorHandler::convertExceptionToError($e);
            return '';
        } catch (\Throwable $e) {
            ErrorHandler::convertExceptionToError($e);
            return '';
        }
    }
```

* Add \Throwable to phpdoc in response.php 

The ErrorHandler has been updated in phpdoc to have throwable, this complets that change.

* Update ErrorHandler.php

fixed missing `|`
2020-09-30 02:34:23 +03:00
Alex
1d7baabab5 Fix #18297: Replace usage of deprecated ReflectionParameter::isArray() method in PHP8 2020-09-22 00:26:37 +03:00
My6UoT9
affd796c5c Updated phpdoc return type for getExceptionName (#18296)
`getExceptionName` can return null, as described in phpdoc.
2020-09-21 23:03:02 +03:00
Alexander Makarov
f34d160179 Remove unused use 2020-08-05 09:23:12 +03:00
Alexander Makarov
dab7a6c317 Update phpdoc 2020-07-20 02:44:55 +03:00
Brandon Kelly
eb956e9c6b primary/replica in a definitely non-breaking way (#18106) 2020-06-16 11:33:27 +03:00
Brandon Kelly
fc4f449e21 Fix #18083: Add Controller::$request and $response 2020-06-14 21:19:27 +03:00
Brandon Kelly
472600ee3f Fix #18102: Use “primary”/“replica” terminology instead of “master”/“slave” 2020-06-14 00:12:10 +03:00
Marco van 't Wout
9a3093442c Use inheritDoc to replace outdated docblock (#18100) 2020-06-13 12:50:34 +03:00
Sam
4ea484ca68 Fix #17722: Add action injection support 2020-06-12 10:06:18 +03:00
Alex
eb7b23d117 Fix #18048: Use Instance::ensure() to set User::$accessChecker 2020-05-19 18:42:13 +03:00
scottix
975937e531 Fix #18006: Allow SameSite cookie pre PHP 7.3 2020-05-01 13:28:23 +03:00
Brandon Kelly
13c14292c2 Fix #17948: Ignore errors caused by set_time_limit(0) 2020-04-05 11:55:26 +03:00
Alexander Makarov
fbd7eded2d Bug #17933: Log warning instead of erroring when URLManager is unable to initialize cache 2020-03-26 23:21:35 +03:00
Brandon Kelly
f8d417c42a Fixed usage of non-existing ResponseEvent in yii\web\Response docs (#17939) 2020-03-26 15:45:39 +03:00
Alexander Makarov
65e5640810 Fix #17932: Fix regression in detection of AJAX requests (#17937) 2020-03-26 12:30:56 +03:00
Igor Tarasov
7f88acb313 Fix #17878: Detect CORS AJAX requests without X-Requested-With in Request::getIsAjax() 2020-03-24 19:01:52 +03:00
Alex
4b6d3c0290 Fix #17929: Actions can now have bool typed params bound 2020-03-24 18:44:43 +03:00
Robert Korulczyk
ec089fea5a Fix #16721: Use Instance::ensure() to initialize UrlManager::$cache 2020-02-23 16:02:27 +03:00
Yusup Hambali
55793471ea Fix #17875: Revert move_uploaded_file() function instead of copy() and unlink() for saving uploaded files when POST request 2020-02-20 12:22:01 +03:00
Alexander Makarov
7ec7fd11ee Fix #17878: Added note about fetch() to Request::getIsAjax() phpdoc [skip ci] 2020-02-20 01:10:59 +03:00
schevgeny
15d425a3e3 Fix #17843: Fix yii\web\Session::setCookieParamsInternal check param "samesite" 2020-02-03 13:52:46 +03:00
haveyaseen
82b7ecbdf3 Fix #17828: Fix yii\web\UploadedFile::saveAs() failing when error value in $_FILES entry is a string 2020-02-01 12:56:22 +03:00
Alexander Makarov
fd6ccb615c release version 2.0.32 2020-01-22 01:29:38 +03:00
Alexander Makarov
706890a36e Add "since" tags to UploadedFile [skip ci] 2020-01-22 01:01:16 +03:00
Ather Shu
038ce9f77e Fix #17755: Fix a bug for web request with trustedHosts set to format ['10.0.0.1' => ['X-Forwarded-For']] 2020-01-15 15:51:57 +03:00
Yusup Hambali
cf0e56907f Fix #17037, Fix #17729: Fix uploaded file saving for multipart forms, add path alias support for UploadFile::saveAs() 2020-01-15 00:57:45 +03:00
Somogyi Márton
5e71b11d8d #17733: Additional fixes for #17665, Forwarded header parsing in Request
- Remove header from secure headers
- Regexp and return null fix
- Fix tests, fix in array case sensitivity, rx duplicated group name
- Simplify code
- Add phpdoc

Co-Authored-By: Alexander Makarov <sam@rmcreative.ru>
2019-12-17 21:53:55 +03:00
Mikk Tendermann
83055dcc33 Fix #17665: Implement RFC 7239 Forwarded header parsing in Request 2019-12-12 23:29:54 +03:00
Alexander Makarov
69b1966b4a PHP 7.4 fixes
- Fix `Model::activeAttributes()` to access array offset on value of non-string
- Fix incorrect decoding of default binary value for PostgreSQL
- Fix incorrect type-casting of reflection type to string
2019-12-10 15:08:45 +03:00
Bizley
1a8c83ba43 Fix #17694: Fixed Error Handler to clear registered view tags, scripts, and files when rendering error view through action view 2019-12-03 21:36:48 +03:00
Brandon Kelly
40797c1139 Fix #17701: Throw BadRequetHttpException when request params can’t be bound to bool, int, and float controller action arguments 2019-12-03 12:40:56 +03:00
Somogyi Márton
6c1b2db9de Fix #17434: IE Ajax redirect fix for non 11.0 versions 2019-11-18 12:45:35 +03:00
AlexRas007
9c5cd51a3b Fix #17632: Unicode file name was not correctly parsed in multipart forms 2019-11-05 14:42:22 +03:00
Alexandr Kozhevnikov
848ab0ce6e Fix #17606: Fix error in AssetBundle when a disabled bundle with custom init() was still published 2019-10-13 19:50:27 +03:00
Somogyi Márton
9054cdfdcc Fixes #17521: Request::getUserHost() and request::getUserIp() (#17593) 2019-10-05 22:33:29 +03:00
Somogyi Márton
c87855b31c Fix #17573: Request::getUserIP() security fix for the case when Request::$trustedHost and Request::$ipHeaders are used 2019-10-03 14:56:20 +03:00
Alexandr Kozhevnikov
96cd8bcb68 Fix #16826: appendTimestamp support was added to View methods registerCssFile() and registerJsFile() 2019-09-17 14:07:15 +03:00
Somogyi Márton
c75ef05539 Fix #17434: Fix regular expression illegal character; Repeated fix for Internet Explorer 11 AJAX redirect bug in case of 301 and 302 response codes (XMLHttpRequest: Network Error 0x800c0008) 2019-09-10 13:52:08 +03:00
Alexander Makarov
aeff8466ff Fix #17544: Removed incorrect statement about default value from Session::$gCProbability and its getter [skip ci] 2019-09-05 21:38:13 +03:00
Brandon Kelly
37df938338 Fix #16531: Fix error in Response::sendContent() when set_time_limit() is disabled 2019-09-03 19:40:44 +03:00
Somogyi Márton
10a069a3a4 Fix #17434: Fixed Internet Explorer 11 AJAX redirect bug in case of 301 and 302 response codes (XMLHttpRequest: Network Error 0x800c0008) 2019-09-03 17:54:14 +03:00
alex-code
378f9ad598 Fix #17424: Subdomain support for User::loginRequired 2019-07-18 11:46:05 +03:00
Konstantin
5c7db1690e Add type null to @return annotation of findIdentityByAccessToken and findIdentity methods (#17430) [skip ci] 2019-07-12 14:15:24 +03:00
Alexander Makarov
f3d1534125 release version 2.0.21 2019-06-18 17:25:08 +03:00
Alexander Kartavenko
3601d512c2 Fixes #17070: Strip invalid character from fallback file name 2019-06-12 23:41:40 +03:00
rhertogh
1ed6ec1e5c Fixes #17353: Added sameSite support for yii\web\Cookie and yii\web\Session::cookieParams 2019-06-11 00:33:36 +03:00