Repository navigation
fix #4690 URL の途中の階層に「.」があると拡張子とみなされる問題を修正 - #4698
Merged
Merged
Conversation
Collaborator
|
レビューしました。修正内容は問題ありません。Issue の例 改善提案(任意・元からある不具合なので、この PR の範囲外でも構いません)途中の階層に「.」があり、かつ末尾に拡張子がある URL では、まだ正しく解析できません。 例:
先頭を固定して貪欲にマッチさせると解消します。 if(preg_match('/^(.+)\.([^.\/]+)$/', $requestUrl, $matches)) {この場合、 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@ryuring
概要
#4690 の修正です。 ご確認お願いします。
BcContentsRoute::getParams()で拡張子を取り出す正規表現が「.」のあとに「/」を含むことを許可していたことで、途中の階層にある「.」から末尾までが拡張子とみなされ、以降の pass・名前付きパラメーターが消えていました。拡張子は最後の階層だけから取るようにしました。
/([^.]+)\.([^.]+)$//([^.]+)\.([^.\/]+)$/