このバグは解消されました。エントリ「%-escape が適切に解釈されないバグが解消されました」をご覧下さい。
%-escape とは URI を記述する際に、区切り文字などとして使われる "/" などの特殊文字や日本語の文字などを %2F のように "%" と 16 進数の文字コードで表現することです。
これは Thingamablog の動作を検証しているときに発見しました。Thingamablog で作成したブログに Thingamablog からアクセスする際に過剰に %-escape してしまい
これは過剰な %-escape で、しかも文字コード部分に仕様である RFC 3986 では推奨されていない小文字を使用しているから Thingamablog のよくないところではあるが間違いというわけでもありません。一方で .Mac の homepage.mac.com の反応は間違っています。これについては先ほど .Mac フィードバックにメールを送ったのでそれを提示しておきます。
Subject %-escape の処理が間違っています From "OKAMURA Yuji" <yuji_okamura@mac.com> Date Thu, 20 Oct 2005 01:09:46 +0900 To mac-feedback@apple.co.jp 【要件】 homepage.mac.com において以下に述べるような不具合が起きています。間違っ た処理なので早急に改善してください。 【不具合】 ユーザ名の一部を %-escape してアクセスした際にアカウントエラーのページ <http://www.mac.com/account_error.html> にリダイレクトされてしまいます。 【解説】 普通のアルファベットが %-escape されることは通常ないと思われますが、"_" のような文字を %-escape してしまう処理系が実際に存在します。受ける側とし ては予約文字ではない文字の %-escape も適切にデコードされる必要がありま す。アカウントエラーということはデコードされずにバックエンドの処理に渡さ れているものと予想されます。ユーザの存在を確認する前に %-escape を適切に デコードしておく必要があります。 【例】 私のサイト <http://homepage.mac.com/yuji_okamura/> にアクセスする際に <http://homepage.mac.com/%79uji_okamura/> <http://homepage.mac.com/y%75ji_okamura/> <http://homepage.mac.com/yu%6Ai_okamura/> <http://homepage.mac.com/yuj%69_okamura/> <http://homepage.mac.com/yuji%5Fokamura/> <http://homepage.mac.com/yuji_%6Fkamura/> <http://homepage.mac.com/yuji_o%6Bamura/> <http://homepage.mac.com/yuji_ok%61mura/> <http://homepage.mac.com/yuji_oka%6Dura/> <http://homepage.mac.com/yuji_okam%75ra/> <http://homepage.mac.com/yuji_okamu%72a/> <http://homepage.mac.com/yuji_okamur%61/> というように %-escape を施すと全てアカウントエラーのページ <http://www.mac.com/account_error.html> にリダイレクトされてしまいます。 【技術的根拠】 RFC 3986 (<http://www.ietf.org/rfc/rfc3986.txt>) の「2.4. When to Encode or Decode」より The only exception is for percent-encoded octets corresponding to characters in the unreserved set, which can be decoded at any time. For example, the octet corresponding to the tilde ("~") character is often encoded as "%7E" by older URI processing implementations; the "%7E" can be replaced by "~" without changing its interpretation. 特に最後の部分 "without changing its interpretation" に注目してください。 -- OKAMURA Yuji
【要件】 homepage.mac.com において以下に述べるような不具合が起きています。間違っ た処理なので早急に改善してください。 【不具合】 ユーザ名の一部を %-escape してアクセスした際にアカウントエラーのページ <http://www.mac.com/account_error.html> にリダイレクトされてしまいます。 【解説】 普通のアルファベットが %-escape されることは通常ないと思われますが、"_" のような文字を %-escape してしまう処理系が実際に存在します。受ける側とし ては予約文字ではない文字の %-escape も適切にデコードされる必要がありま す。アカウントエラーということはデコードされずにバックエンドの処理に渡さ れているものと予想されます。ユーザの存在を確認する前に %-escape を適切に デコードしておく必要があります。 【例】 私のサイト <http://homepage.mac.com/yuji_okamura/> にアクセスする際に <http://homepage.mac.com/%79uji_okamura/> <http://homepage.mac.com/y%75ji_okamura/> <http://homepage.mac.com/yu%6Ai_okamura/> <http://homepage.mac.com/yuj%69_okamura/> <http://homepage.mac.com/yuji%5Fokamura/> <http://homepage.mac.com/yuji_%6Fkamura/> <http://homepage.mac.com/yuji_o%6Bamura/> <http://homepage.mac.com/yuji_ok%61mura/> <http://homepage.mac.com/yuji_oka%6Dura/> <http://homepage.mac.com/yuji_okam%75ra/> <http://homepage.mac.com/yuji_okamu%72a/> <http://homepage.mac.com/yuji_okamur%61/> というように %-escape を施すと全てアカウントエラーのページ <http://www.mac.com/account_error.html> にリダイレクトされてしまいます。 【技術的根拠】 RFC 3986 (<http://www.ietf.org/rfc/rfc3986.txt>) の「2.4. When to Encode or Decode」より The only exception is for percent-encoded octets corresponding to characters in the unreserved set, which can be decoded at any time. For example, the octet corresponding to the tilde ("~") character is often encoded as "%7E" by older URI processing implementations; the "%7E" can be replaced by "~" without changing its interpretation. 特に最後の部分 "without changing its interpretation" に注目してください。 -- OKAMURA Yuji
日付けによるアーカイブ
.Mac および .Mac 配布アプリケーションを利用するためのノウハウやツールを提供しているウェブログです。iBlog の諸問題を克服し様々な機能を追加するためのツール iblogPatcher とそのプラグインや iBlog のバックアッププログラム iBlogFreezer の開発と公開、.Mac カウンタなど .Mac 提供機能の流用&カスタマイズ方法の紹介などがメインコンテンツです。
うっかりすると駄目になってしまいます。エラーが検出されたときは Blog コメントでお知らせください。
iBlog