Skip to content

Commit

Permalink
# [LOW] The cookie consent code was outside the BODY tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas K. Dionysopoulos committed Mar 12, 2019
1 parent 5a5d959 commit 2ec6db3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ Akeeba Data Compliance 1.1.0
+ Protection of all component and plugin folders against direct web access
+ Export data: support for Joomla “privacy” group plugins
! Immediate failure accessing the backend of the component [gh-27]
# [HIGH] ATS export, causing fatal error
# [LOW] Cookie compliance fails with a fatal error when the server does not set the HTTP_HOST environment variable
# [LOW] PHP 7.3 warning in the Control Panel page
# [HIGH] ATS export, causing fatal error
# [LOW] The cookie consent code was outside the BODY tag

Akeeba Data Compliance 1.0.1
================================================================================
Expand Down
12 changes: 11 additions & 1 deletion plugins/system/datacompliancecookie/datacompliancecookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,17 @@ private function loadHtml($app)
}

// Append the parsed view template content to the application's HTML output
$app->setBody($app->getBody() . $content);
$body = $app->getBody();
$postBody = '';
$closeTagPos = strpos($body, '</body');

if ($closeTagPos !== false)
{
$postBody = substr($body, $closeTagPos);
$body = substr($body, 0, $closeTagPos);
}

$app->setBody($body . $content . $postBody);
}

/**
Expand Down

0 comments on commit 2ec6db3

Please sign in to comment.