Skip to content

Commit 9b12277

Browse files
authored
Merge pull request #57133 from nextcloud/fix-template-headers-injection
fix(lib): include headers from OC\Template\Template as well in produced HTML
2 parents e594e9d + 8482302 commit 9b12277

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Template/Template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function fetchPage(?array $additionalParams = null): string {
122122

123123
// Add custom headers
124124
$headers = '';
125-
foreach (\OC_Util::$headers as $header) {
125+
foreach (array_merge(\OC_Util::$headers, $this->headers) as $header) {
126126
$headers .= '<' . Util::sanitizeHTML($header['tag']);
127127
if (strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes'])))) {
128128
$headers .= ' defer';

0 commit comments

Comments
 (0)