Skip to content

Commit

Permalink
improv. remove warnings messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nivcoo committed Dec 6, 2021
1 parent 675a6ab commit 49a491e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function beforeFilter()
{
// find any xss vulnability on request data
$datas = $this->request->data;
$this->request->data = $this->xssProtection($datas, ['command', 'order', 'broadcast']);
$this->request->data = $this->xssProtection($datas, ['command', 'cmd', 'order', 'broadcast']);
$this->request->data["xss"] = $datas;
// lowercase to avoid errors when the controller is called with uppercase
$this->params['controller'] = strtolower($this->params['controller']);
Expand Down Expand Up @@ -553,9 +553,11 @@ public function __initSeoConfiguration()
$default = $this->Seo->find('first', ["conditions" => ['page' => null]])['Seo'];
$current_url = $this->here;
$get_page = [];
$check = max($this->Seo->find('all', ['conditions' => ["'" . $current_url . "' LIKE CONCAT(page, '%')"]]));
if ($check && ($check['Seo']["page"] == $current_url || $current_url != "/"))
$check = $this->Seo->find('all', ['conditions' => ["'" . $current_url . "' LIKE CONCAT(page, '%')"]]);

if ($check && ($check = max($check)) && ($check['Seo']["page"] == $current_url || $current_url != "/"))
$get_page = $check['Seo'];

$seo_config['title'] = (!empty($default['title']) ? $default['title'] : "{TITLE} - {WEBSITE_NAME}");
$seo_config['title'] = (!empty($get_page['title']) ? $get_page['title'] : $seo_config['title']);
$seo_config['description'] = (!empty($get_page['description']) ? $get_page['description'] : (!empty($default['description']) ? $default['description'] : ""));
Expand Down

0 comments on commit 49a491e

Please sign in to comment.