{"action":"created","issue":{"url":"https://api.github.com/repos/contao/core/issues/8060","labels_url":"https://api.github.com/repos/contao/core/issues/8060/labels{/name}","comments_url":"https://api.github.com/repos/contao/core/issues/8060/comments","events_url":"https://api.github.com/repos/contao/core/issues/8060/events","html_url":"https://github.com/contao/core/issues/8060","id":110928526,"number":8060,"title":"Possible infinite recursion between pagination-handling and 404-page-generation with bad URL-parameter","user":{"login":"trent2","id":451837,"avatar_url":"https://avatars.githubusercontent.com/u/451837?v=3","gravatar_id":"","url":"https://api.github.com/users/trent2","html_url":"https://github.com/trent2","followers_url":"https://api.github.com/users/trent2/followers","following_url":"https://api.github.com/users/trent2/following{/other_user}","gists_url":"https://api.github.com/users/trent2/gists{/gist_id}","starred_url":"https://api.github.com/users/trent2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trent2/subscriptions","organizations_url":"https://api.github.com/users/trent2/orgs","repos_url":"https://api.github.com/users/trent2/repos","events_url":"https://api.github.com/users/trent2/events{/privacy}","received_events_url":"https://api.github.com/users/trent2/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/contao/core/labels/defect","name":"defect","color":"bd2c00"},{"url":"https://api.github.com/repos/contao/core/labels/up%20for%20discussion","name":"up for discussion","color":"2a982a"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/contao/core/milestones/116","html_url":"https://github.com/contao/core/milestones/3.5.5","labels_url":"https://api.github.com/repos/contao/core/milestones/116/labels","id":1346391,"number":116,"title":"3.5.5","description":"Contao 3.5.5 (bugfix release)","creator":{"login":"leofeyer","id":1192057,"avatar_url":"https://avatars.githubusercontent.com/u/1192057?v=3","gravatar_id":"","url":"https://api.github.com/users/leofeyer","html_url":"https://github.com/leofeyer","followers_url":"https://api.github.com/users/leofeyer/followers","following_url":"https://api.github.com/users/leofeyer/following{/other_user}","gists_url":"https://api.github.com/users/leofeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/leofeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leofeyer/subscriptions","organizations_url":"https://api.github.com/users/leofeyer/orgs","repos_url":"https://api.github.com/users/leofeyer/repos","events_url":"https://api.github.com/users/leofeyer/events{/privacy}","received_events_url":"https://api.github.com/users/leofeyer/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":1,"state":"open","created_at":"2015-10-09T11:38:46Z","updated_at":"2015-10-15T17:20:12Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2015-10-12T08:23:49Z","updated_at":"2015-10-17T14:58:14Z","closed_at":null,"body":"Using modules which offer pagination on a 404-page might result in a condition where functions call each other repeatedly.\r\nE.g. Having an event list (module XXX) with \"items per page\" != 0 and using `&page_eXXX`(some number outside the range of valid pages) as an URL-parameter triggers a 404.\r\nIf the same module XXX appears on the 404-page it again receives the parameter `page_eXXX` and triggers the 404 again. In the end this results in some kind of \"stack overflow\"/maximum memory exhausted error. On my site this was triggered by some search machine bot which lead to clogging the system log with 404-errors, resulting in a 1GB-log table in a relatively short period of time.\r\nThis can be reproduces in the demo by\r\n* using a \"real\" 404-page (not a 302-redirection as in the demo)\r\n* change \"items per page\" to some value != 0 and \"number of events\" to 0, e.g. in module 35.\r\n* use `page_e35`=invalid page number as an URL-parameter\r\n\r\nI don't like the remedy not to use paginated modules on a 404-page, why shouldn't I? Maybe the URL-parameter should not be forwarded to the 404-page, maybe a 404 should not be generated at all?"},"comment":{"url":"https://api.github.com/repos/contao/core/issues/comments/148921728","html_url":"https://github.com/contao/core/issues/8060#issuecomment-148921728","issue_url":"https://api.github.com/repos/contao/core/issues/8060","id":148921728,"user":{"login":"Znrl","id":2005708,"avatar_url":"https://avatars.githubusercontent.com/u/2005708?v=3","gravatar_id":"","url":"https://api.github.com/users/Znrl","html_url":"https://github.com/Znrl","followers_url":"https://api.github.com/users/Znrl/followers","following_url":"https://api.github.com/users/Znrl/following{/other_user}","gists_url":"https://api.github.com/users/Znrl/gists{/gist_id}","starred_url":"https://api.github.com/users/Znrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Znrl/subscriptions","organizations_url":"https://api.github.com/users/Znrl/orgs","repos_url":"https://api.github.com/users/Znrl/repos","events_url":"https://api.github.com/users/Znrl/events{/privacy}","received_events_url":"https://api.github.com/users/Znrl/received_events","type":"User","site_admin":false},"created_at":"2015-10-17T14:58:14Z","updated_at":"2015-10-17T14:58:14Z","body":"To be a bit more specific:\r\nFor me it doesn't make a real difference if you call:\r\n- page 1 of 0 (no events to show, no parameter in this case)\r\n- page 5 of 4 (not enough events to show)\r\nBut in the first case there is no 404 but a (error)message (no events to show) while in the second case there is a 404.\r\nThats why I would suggest a comparable message including paginations links to get to an existing pagination site.\r\n\r\nThe site actually exists -> no 404!\r\nAnd if you are searching for events 50-60 (page 5) while there are only 45 events it leads to an empty result -> message.\r\nThats at least my opinion."}}