Project

General

Profile

Actions

Bug #88958

closed

Linkvalidator: incorrect range specification

Added by Dmitry Dulepov over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Linkvalidator
Target version:
-
Start date:
2019-08-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

EXT:linkvalidator/Classes/Linktype/ExternalLinktype.php, function checkLink near line 88:

                // HEAD was not allowed or threw an error, now trying GET
                $options['headers']['Range'] = 'bytes = 0 - 4048';
                $isValidUrl = $this->requestUrl($url, 'GET', $options);

According to RFC 7233 there can be no spaces in range specification. Some web servers strictly follow this and throw a 416 http error.

Simple remove spaces like this:

                // HEAD was not allowed or threw an error, now trying GET
                $options['headers']['Range'] = 'bytes=0-4048';
                $isValidUrl = $this->requestUrl($url, 'GET', $options);
Actions #1

Updated by Dmitry Dulepov over 4 years ago

By the way, there is no need to fetch 4K of bytes. 512 or even 256 bytes will be enough.

Actions #2

Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61496

Actions #3

Updated by Dmitry Dulepov over 4 years ago

The fix is contributed by the University of Basel.

Actions #4

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61468

Actions #5

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61469

Actions #6

Updated by Dmitry Dulepov over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF