mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
in the link reference provider, check if the link content type begins with text/html
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
This commit is contained in:
parent
ff0a32f70f
commit
b07adddf39
1 changed files with 3 additions and 1 deletions
|
|
@ -116,7 +116,9 @@ class LinkReferenceProvider implements IReferenceProvider {
|
|||
return;
|
||||
}
|
||||
$linkContentType = $headResponse->getHeader('Content-Type');
|
||||
if ($linkContentType !== 'text/html') {
|
||||
$expectedContentType = 'text/html';
|
||||
// check the header begins with the expected content type
|
||||
if (substr($linkContentType, 0, strlen($expectedContentType)) !== $expectedContentType) {
|
||||
$this->logger->debug('Skip resolving links pointing to content type that is not "text/html"');
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue