Actions
Bug #101505
openDomain with non-ascii symbols causes a 503 for "page not found" handling
Status:
New
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2023-07-31
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:
Description
Page not found handling is broken for domains with non-ascii names:
1. You have a domain name like áéćž.com
2. You have the following error handling configuration:
errorHandling: - errorCode: 404 errorHandler: Page errorContentSource: 't3://page?uid=6'
The result for non-existing pages is:
503 Page Not Found External error page could not be retrieved. Client error: `GET https://áéćž.com/404/` resulted in a `401 Unauthorized` response: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Seite nicht gefunden</title> <meta nam (truncated...)
The problem is in EXT:core/Classes/Error/PageErrorHandler/PageContentErrorHandler.php
, near line 103:
$this->pageUid = $urlParams['pageuid'] = (int)($urlParams['pageuid'] ?? 0); $resolvedUrl = $this->resolveUrl($request, $urlParams);
The urls needs to be converted to punycode before passing it to the request. It should fetch https://xn--1caq4gov.com/404/
instead of https://áéćž.com/404/
.
We use squid proxy for non-local sites. Not sure if it is important.
Actions