Extend IIS web.config to allow colons in URLs

Created on 15 July 2017, over 7 years ago
Updated 13 August 2024, 4 months ago

Problem/Motivation

The current web.config doesn't relax the default requestPathInvalidCharacters settings of IIS.
This means that colons (:) in URLs are classified as invalid characters.
Because of this URLs like the one from the block management (http://wl56www523.webland.ch/drupal/web/admin/structure/block/add/block_content%3Adc5f60cf-8510-4a21-b899-641571747188/bodies?region=section_first&_wrapper_format=drupal_modal) are blocked.

Proposed resolution

Add the <httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="*,%,?,\,&amp;,&lt;,&gt;" /> directive to the web.config file.
This should allow colons in URLs.

Remaining tasks

This was tested with "Microsoft-IIS/7.5" and "AspNet-Version:4.0.30319" - as I'm very unfamiliar with IIS this defintitely needs a review from someone that's more familiar with that webserver.
Another open question is if the config syntax for &,<,> is valid - I had to use &amp;,&lt;,&gt to avoid a 500 error from IIS, and it seems like the related chars are filtered properly.
However, if this is server version / configuration specific syntax we might break installations if we simply update the web.config.

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Closed: won't fix

Version

10.1 ✨

Component
OtherΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡¨πŸ‡­Switzerland das-peter

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024