Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.2系でsitemap_product_0.xmlと指定するとシステムエラーが発生する。 #6074

Open
k-yamamura opened this issue Dec 14, 2023 · 2 comments
Milestone

Comments

@k-yamamura
Copy link
Contributor

概要(Overview)

URLに
sitemap_product_9999.xmlやsitemap_product_aaaaa.xml
を指定すると404エラーになるが、
sitemap_product_0.xml
と指定するとシステムエラーが発生する。

回避策もなさそうなので、商品一覧と同じく

$pagination = $paginator->paginate(
    $productQueryBuilder,
    $request->get('page'),
    $this->eccubeConfig['eccube_sitemap_products_per_page']
)

から

$pagination = $paginator->paginate(
    $productQueryBuilder,
    $request->get('page') ?: 1,
    $this->eccubeConfig['eccube_sitemap_products_per_page']
)

と1を指定するしか回避策が無さそう。

再現手順(Procedure)

上記の通り

環境(Environment)

EC-CUBE:4.2.x

EC-CUBE4.1だと404エラーとなるが、EC-CUBE4.2だと

Invalid page number. Page: 0: $page must be positive non-zero integer

というエラーが発生するので、knp-paginator-bundleのバージョンアップによって厳密に0チェックするようになったかも。

@k-yamamura k-yamamura added the bug label Dec 14, 2023
@k-yamamura
Copy link
Contributor Author

sitemap_product_9999999999999999.xml
と有り得ない数字を入力されたらEC-CUBE4.1も4.2もどうすることも出来無さそう。
他のページでもrequirements={"xxx" = "\d+"}というようなチェックをしている、
オーバーフローが発生しそうな箇所はどうすることも出来無さそう。

@dotani1111
Copy link
Contributor

@k-yamamura
Issueありがとうございます 👍
再現確認できました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants