mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 11:26:04 +01:00
check for empty data types #1537
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
# v1.9.0-beta.6
|
# v1.9.0-beta.6
|
||||||
## mm/dd/2018
|
## mm/dd/2018
|
||||||
|
|
||||||
1. [](#bugfix)
|
1. [](#improved)
|
||||||
* Fix Grav core update causing error when underlying classes change
|
* v.1.8.14 fixes merged in
|
||||||
|
|
||||||
# v1.9.0-beta.5
|
# v1.9.0-beta.5
|
||||||
## 11/05/2018
|
## 11/05/2018
|
||||||
@@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
1. [](#bugfix)
|
1. [](#bugfix)
|
||||||
* Fixed Grav core update potentially spinning forever because of an error which happens after a successful upgrade
|
* Fixed Grav core update potentially spinning forever because of an error which happens after a successful upgrade
|
||||||
|
* Saving in expert mode can cause `undefined index: header` error [#1537](https://github.com/getgrav/grav-plugin-admin/issues/1537)
|
||||||
|
|
||||||
# v1.8.13
|
# v1.8.13
|
||||||
## 11/05/2018
|
## 11/05/2018
|
||||||
|
|||||||
@@ -658,7 +658,7 @@ class AdminController extends AdminBaseController
|
|||||||
// XSS Checks for page content
|
// XSS Checks for page content
|
||||||
$xss_whitelist = $this->grav['config']->get('security.xss_whitelist', 'admin.super');
|
$xss_whitelist = $this->grav['config']->get('security.xss_whitelist', 'admin.super');
|
||||||
if (!$this->admin->authorize($xss_whitelist)) {
|
if (!$this->admin->authorize($xss_whitelist)) {
|
||||||
$check_what = ['header' => $data['header'], 'content' => isset($data['content']) ? $data['content'] : ''];
|
$check_what = ['header' => isset($data['header']) ? $data['header'] : '', 'frontmatter' => isset($data['frontmatter']) ? $data['frontmatter'] : '', 'content' => isset($data['content']) ? $data['content'] : ''];
|
||||||
$results = Security::detectXssFromArray($check_what);
|
$results = Security::detectXssFromArray($check_what);
|
||||||
if (!empty($results)) {
|
if (!empty($results)) {
|
||||||
$this->admin->setMessage('<i class="fa fa-ban"></i> ' . $this->admin->translate('PLUGIN_ADMIN.XSS_ONSAVE_ISSUE'),
|
$this->admin->setMessage('<i class="fa fa-ban"></i> ' . $this->admin->translate('PLUGIN_ADMIN.XSS_ONSAVE_ISSUE'),
|
||||||
|
|||||||
Reference in New Issue
Block a user