By serg2 on
Change record status:
Project:
Introduced in branch:
8.1.x
Introduced in version:
8.1.0
Description:

The .well-known directory has been whitelisted in .htaccess. This makes Drupal compliant with RFC 5785 which establishes a .well-known URI location.

There are two separate sections of .htaccess that needed to change. To make these changes in a custom .htaccess file, use these two diffs as a guide:
http://cgit.drupalcode.org/drupal/commit/?id=9a283adf643b7e3ceaf6b92f1de...
http://cgit.drupalcode.org/drupal/commit/?id=b52ac5eb58ccea29dd906efd0e7...

Note that the second diff supersedes the corresponding change in the first, i.e. the final RewriteRule should look like:

RewriteRule "/\.|^\.(?!well-known/)" - [F]
Impacts:
Site builders, administrators, editors

Comments

David Grudl’s picture

Small bug

David Grudl commented

It should be RewriteRule "(^|/)\.(?!well-known/)" - [F] because now it whitelists directories like ./well-knownabc too.

Do you know that it whitelists sub-directories like example.com/abc/.wellknown? It seems that RFC 5785 is talking only about "path prefix", ie. example.com/.wellknown.

Correct is RewriteRule /\.|^\.(?!well-known/) - [F]

David_Rothstein’s picture

Thanks for catching that!

David_Rothstein commented

Thanks for catching that!

In the future it's better to leave comments like that on the issue itself, where it's more likely to be noticed. I went ahead and added you to the issue (https://www.drupal.org/node/2408321) now.

David_Rothstein’s picture

Note that the above has now

David_Rothstein commented

Note that the above has now been fixed and the change record now contains the correct code.