-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.1.15 Uncaught HttpBadRequestException: Invalid UTF-8 characters caused by old searchbot requests #4712
Comments
This isn't a problem on the demo server. The URL is valid UTF-8 and is recognised OK. https://dev.webtrees.net/demo-dev/tree/demo/branches/lammh%C3%B6fer My guess is that the validation error is occurring on one of the HTTP request headers. Control panel -> Server information -> PHP Variables. Are there any "interesting" |
I don't think that there are added headers, it's nativ IIS10
|
Perhaps you could add some debug code here: Lines 63 to 68 in 684a6f8
Write |
I added in line 67 |
If this is CP1252, then Can you add both |
$value: "P�ch" 'P\xE4ch' |
It's pretty URL on IIS related |
Anforderungs-URL: https://wbt.warius.info/tree/Warius/branches/P%C3%A4ch |
It's an issue of IIS URL Rewrite module wich decode the REQUEST_URI when rewriting. XDebug shows the following server variables: Webtrees should use UNENCODED_URL for IIS I can also change the rewrite rule but I need some information I can add the unencoded_url to index.php but don't now how webtrees need it |
fixed by adding complete rule: should we update the documentation? |
There are two parts to this issue.
Currently, we check that the headers contain valid UTF8.
This needs to be fixed, so that we can give the correct |
2 Notes:
|
I have a lot 500 errors e.g. from bing using old links with umlaut
https://wbt.warius.info/tree/Warius/branches/lammh%C3%B6fer
can You please redirect to an 404 error?
Uncaught Fisharebest\Webtrees\Http\Exceptions\HttpBadRequestException: Invalid UTF-8 characters in request in D:\web\WT21Git\webtrees\app\Validator.php:67 Stack trace:
#0 [internal function]: Fisharebest\Webtrees\Validator::Fisharebest\Webtrees{closure}('lammh\xF6fer', 'surname')
#1 D:\web\WT21Git\webtrees\app\Validator.php(71): array_walk_recursive(Array, Object(Closure))
#2 D:\web\WT21Git\webtrees\app\Validator.php(85): Fisharebest\Webtrees\Validator->__construct(Array, Object(Nyholm\Psr7\ServerRequest), 'UTF-8')
#3 D:\web\WT21Git\webtrees\app\Http\Middleware\HandleExceptions.php(155): Fisharebest\Webtrees\Validator::attributes(Object(Nyholm\Psr7\ServerRequest))
#4 D:\web\WT21Git\webtrees\app\Http\Middleware\HandleExceptions.php(99): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->httpExceptionResponse(Object(Nyholm\Psr7\ServerRequest), Object(Fisharebest\Webtrees\Http\Exceptions\HttpBadRequestException))
#5 D:\web\WT21Git\webtrees\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
The text was updated successfully, but these errors were encountered: