Skip to content

Commit fb9c840

Browse files
committed
Merge branch 'development' into release
2 parents 5fba4a5 + 94165cc commit fb9c840

File tree

16 files changed

+235
-208
lines changed

16 files changed

+235
-208
lines changed

.github/translators.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,3 +453,5 @@ Mohammed srhiri (m.sghiri20) :: Arabic
453453
YongMin Kim (kym0118) :: Korean
454454
Rivo Zängov (Eraser) :: Estonian
455455
Francisco Rafael Fonseca (chicoraf) :: Portuguese, Brazilian
456+
ИEØ_ΙΙØZ (NEO_IIOZ) :: Chinese Traditional
457+
madnjpn (madnjpn.) :: Georgian

app/Access/Oidc/OidcUserinfoResponse.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ class OidcUserinfoResponse implements ProvidesClaims
1111

1212
public function __construct(ResponseInterface $response, string $issuer, array $keys)
1313
{
14-
$contentType = $response->getHeader('Content-Type')[0];
14+
$contentTypeHeaderValue = $response->getHeader('Content-Type')[0] ?? '';
15+
$contentType = strtolower(trim(explode(';', $contentTypeHeaderValue, 2)[0]));
16+
1517
if ($contentType === 'application/json') {
1618
$this->claims = json_decode($response->getBody()->getContents(), true);
1719
}

app/Entities/Tools/PageIncludeParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ protected function splitTextNodesAtTags(DOMNode $textNode): array
104104

105105
if ($currentOffset < $tagStartOffset) {
106106
$previousText = substr($text, $currentOffset, $tagStartOffset - $currentOffset);
107-
$textNode->parentNode->insertBefore(new DOMText($previousText), $textNode);
107+
$textNode->parentNode->insertBefore($this->doc->createTextNode($previousText), $textNode);
108108
}
109109

110-
$node = $textNode->parentNode->insertBefore(new DOMText($tagOuterContent), $textNode);
110+
$node = $textNode->parentNode->insertBefore($this->doc->createTextNode($tagOuterContent), $textNode);
111111
$includeTags[] = new PageIncludeTag($tagInnerContent, $node);
112112
$currentOffset = $tagStartOffset + strlen($tagOuterContent);
113113
}

app/Http/RangeSupportedStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected function parseRequest(Request $request): void
9292
if ($start < 0 || $start > $end) {
9393
$this->responseStatus = 416;
9494
$this->responseHeaders['Content-Range'] = sprintf('bytes */%s', $this->fileSize);
95-
} elseif ($end - $start < $this->fileSize - 1) {
95+
} else {
9696
$this->responseLength = $end < $this->fileSize ? $end - $start + 1 : -1;
9797
$this->responseOffset = $start;
9898
$this->responseStatus = 206;

app/Util/HtmlDocument.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use DOMElement;
77
use DOMNode;
88
use DOMNodeList;
9+
use DOMText;
910
use DOMXPath;
1011

1112
/**
@@ -81,6 +82,14 @@ public function createElement(string $localName, string $value = ''): DOMElement
8182
return $element;
8283
}
8384

85+
/**
86+
* Create a new text node within this document.
87+
*/
88+
public function createTextNode(string $text): DOMText
89+
{
90+
return $this->document->createTextNode($text);
91+
}
92+
8493
/**
8594
* Get an element within the document of the given ID.
8695
*/

0 commit comments

Comments
 (0)