wiki.techinc.nl/tests/phpunit/integration/includes/HTMLForm
Dreamy Jazz 33ac22c576 Allow ContributionsSpecialPage to accept usemodwiki IP addresses
Why:
* In 19238b429f, the
  ContributionsSpecialPage class was modified to not perform
  queries if the submitted form data was not determined to
  be valid.
* This was necessary to allow IPContributions in CheckUser to
  not run the query if the form was invalid.
* However, this broke looking up contributions from IPs that have
  the UseMod wiki format (i.e. "xxx" instead of the last octet of
  an IPv4 address) because the HTMLUserTextField class does not
  consider these as valid IP addresses.
* Fixing this is necessary to allow looking up contributions from
  these IPs in the contribution pagers.

What:
* Update HTMLUserTextField to have a 'usemodwiki-ipallowed' option
  that when specified as true will allow IP addresses in with the
  UseMod wiki format.
** This is done via the regex used by UserDef::processUser which
   determines if an IP is a UseMod wiki IP
** This option is only used if the 'ipallowed' option is also set
   to true.
* Update ContributionsSpecialPage::getTargetField to specify that
  the 'target' field should allow UseMod wiki IP addresses.
* Add tests for the changes to HTMLUserTextField and also a
  regression test via SpecialContributionsTest.

Bug: T370413
Change-Id: I2b1d981a21c7b85c22a371708776c7ca127dec4c
2024-08-19 16:31:47 +00:00
..
Field Allow ContributionsSpecialPage to accept usemodwiki IP addresses 2024-08-19 16:31:47 +00:00
HTMLFormFieldTest.php Html,Xml: Widen @covers tags 2024-03-30 21:48:32 +00:00
HTMLFormFieldTestCase.php tests: Use namespaced classes (2) 2024-06-13 23:21:02 +02:00
HTMLFormTest.php htmlform: Hard-deprecated HTMLForm::*Text functions 2024-07-26 13:02:21 +02:00