-
Notifications
You must be signed in to change notification settings - Fork 334
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
500 errors produced by SiteTree with url segment "0" #2680
Comments
Should resolve: silverstripe#2680
The problem is that on this line, we assigned the URL segment to a variable and we check that if it's falsy. We need to do a strict check instead for
There's a potential follow up problem that the CMS won't let you assign |
We've been getting many bot requests lately that call '/0/...' URLs and cause 500 errors. I've seen that there was a PR (#2681) but it has not been merged. Is there something that was missing in the PR or would you accept a new one that checks if the value is null instead of falsy? |
Yeah we have had a bit of a flood recently as well. Let me know if there is anything I can do to help. |
This is still an issue and has since been carried over to the 5 branch of the cms. |
Linked PR has been merged, this will auto-tag on the 4.13 shortly and will auto-tag on the 5.1 branch within the next week |
To reproduce:
Hit your Silverstripe site with the route
/0/anything
. Theanything
in the URL can be literally any value but the URL must contain0
as the first parameter.https://www.loom.com/share/31c8626c785a432abd0adb4d0d312d68
Expected behaviour:
If the URL does not exist within the CMS or is not valid, the site should return a 404 error.
Current behaviour:
The site returns a 500 error.
Environment:
Tested with Silverstripe 4.8 (PHP 7.4), Silverstripe 3.7.3 (PHP 7.3).
PRs
The text was updated successfully, but these errors were encountered: