Commit b48b752
authored
Fix XSS vulnerability and upgrade PHP 7.4 to 8.4 for Heroku-24 (#869)
* Fix XSS vulnerability in footer script injection (W-21733773)
addFooterScript() stored scripts in $_REQUEST which merges user-supplied
GET/POST/COOKIE data, allowing arbitrary JS injection via crafted query
params. Moved storage to $GLOBALS which is server-side only.
* Upgrade PHP 7.4 to 8.4 for Heroku-24 compatibility
- composer.json: PHP ~8.4.0, sentry/sentry ^4.0 (was ^1.9)
- Replace create_function() with closure in localizeDateTimes()
- Remove all get_magic_quotes_gpc() calls (removed in PHP 8.0)
- Remove libxml_disable_entity_loader() calls (deprecated in PHP 8.0)
- Fix handleAllErrors() $errcontext param (removed in PHP 8.0)
- Migrate ErrorLogging.php from Raven_Client to \Sentry\init()
- Remove always_populate_raw_post_data from fpm_custom.conf
- Update Dockerfile to heroku:24-build and .devcontainer to PHP 8.4
- Add verify_xss_fix.php to .slugignore
* Fix PHP 8.4 compatibility issues breaking REST Explorer
- Remove CURLOPT_BINARYTRANSFER (removed in PHP 8.0)
- Replace catch(Exception) with catch(Throwable) in critical paths
so PHP 8 Error objects are properly caught
- Declare missing $defaultObjectChanged property on WorkbenchContext
- Fix RedisSessionHandler::gc() return type (int, not bool)
* Set review app stack to heroku-24 in app.json
* Harden PHP 8 error handling to catch all throwables
Switch remaining Exception-only catch blocks to Throwable across Workbench request paths so PHP 8 Error/TypeError cases are handled consistently instead of bubbling as fatal errors.
* Refactor SoapBaseClient to manage SOAP headers more effectively
- Introduced a new protected property $soapHeaders to store SOAP headers.
- Updated methods to utilize $soapHeaders for setting and managing SOAP headers, improving code clarity and maintainability.1 parent 1d0ccaf commit b48b752
File tree
39 files changed
+657
-166
lines changed- .devcontainer
- workbench
- async
- bulkclient
- context
- controllers
- restclient
- soapclient
- soxl
- util
39 files changed
+657
-166
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
0 commit comments