Similar issue to T261921, but there doesn't appear to be any working solutions for IIS. I've tried many things that would open up security vulnerabilities with IIS by following a similar solution in the IIS configuration files like this without success.
Suggestion: Visualeditor/parsoid should double encode and be able to process as doubled encoded like %252f
Steps to reproduce:
- I created a brand new page successfully called "Test / ve" with the text "weeeetest". This page is successfully created with visual editor.
- Editing the page results in "Error contacting the Parsoid/RESTBase server (HTTP 404)"
This fails at the page https://localhost/docs/api.php?action=visualeditor&format=json&paction=parse&page=Test_%2F_ve&uselang=en&formatversion=2&oldid=8651
When trying a double encoded solution instead, it continues to fail (https://localhost/docs/api.php?action=visualeditor&format=json&paction=parse&page=Test_%252F_ve&uselang=en&formatversion=2&oldid=8651) with the error
{
"error": {
"code": "invalidtitle",
"info": "Bad title \"Test_%2F_ve\".",
"docref": "See https://localhost/docs/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
}
}When checking the backend portion,
What the wiki sends: https://localhost/docs/rest.php/localhost/v3/page/html/Test_%2f_ve/
{
"messageTranslations": {
"en": "The requested relative path (/localhost/v3/page/html/Test_/_ve/) did not match any known handler"
},
"httpCode": 404,
"httpReason": "Not Found"
}If we try the double encoded url: https://localhost/docs/rest.php/localhost/v3/page/html/Test_%252f_ve/
The URL changes to (notice it single encoded itself) https://localhost/docs/rest.php/localhost/v3/page/html/Test%20%2F%20ve/8651
And returns the below error
{
"messageTranslations": {
"en": "The requested relative path (/localhost/v3/page/html/Test%20/%20ve/8651) did not match any known handler"
},
"httpCode": 404,
"httpReason": "Not Found"
}If we then double encode the last URL again from %2f to %252f: https://localhost/docs/rest.php/localhost/v3/page/html/Test%20%252F%20ve/8651
I now successfully receive the response "weeeetest". However, I couldn't figure out what all I need to change in the code to double encode and get this successfully working in my wiki.