J5.x

J5.x:Paginering class verwijdert query parameters

From Joomla! Documentation

Revision as of 08:19, 21 August 2024 by MartijnM (talk | contribs) (Created page with "==Getroffen versies==")

Gerapporteerde fouten

Deze release van Joomla 5.1.3 en 4.4.7 veranderde hoe de Pagination class links genereert. Na de update ontbreken de voorheen toegevoegde parameters.

Getroffen versies

General Information

This pertains only to Joomla! version(s): 5.1.3, 4.4.7

==What is the cause== So far, the links for the individual pages as well as the "first", "last", "next" and "previous" page automatically included all query parameters that are present in the current request. That behavior create a cache poisoning attack vector.

In order to mitigate that vector, a behavior change had to be introduced. The pagination class will by default only include the following query parameters into the URL generation process:

  • format
  • option
  • view
  • layout
  • tpl
  • id
  • Itemid

==How to fix==

If your extension needs additional parameters, you have to register them using the "setAdditionalUrlParam" method. See the Archive view of com_content as an example: https://github.com/joomla/joomla-cms/blob/51032f65eb10bb9a78be7c264b511a933740318e/components/com_content/src/View/Archive/HtmlView.php#L220