Bad Request - Invalid URL when loading page
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
問題
When trying to access a page with some special characters in its URL (i.e: <baseURL>/display/SPACEKEY/Test+%09Test)
, you'll receive the following instead:
This can occur with any value between %00-%1F, inclusive.
原因
This will only happen if you're using the IIS proxy. When Confluence makes a page it takes the content of the title and encodes it if need be. The characters %00 to %1F represent ASCII control characters, which were originally designed to control hardware devices. You may still see these characters occasionally in text, such as %09, which represents the 'tab' character.
回避策
To allow control characters to be used in URLs, please follow the instructions from this Microsoft KB article to set the "AllowRestrictedChars" registry key to true. This requires a restart of both the HTTP and IIS related services to take effect. A full server restart will do both.
An easy way to do this is to copy the following into a .reg file and run it on your server (for more information see https://support.microsoft.com/en-us/kb/310516/):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters]
"AllowRestrictedChars"=dword:00000001
Alternatively, you can remove the control character from the title itself. To do so:
Find the id of the page with this SQL query:
select contentid from content where title like '%<PAGE_TITLE>%'
Go directly to the editor for this page with this URL:
<baseURL>/pages/editpage.action?pageId=<PAGEID_FROM_QUERY>
- Rename the page, removing the control character.