wiki.techinc.nl/tests/phpunit/unit/includes
David Barratt c36b320454
Handle CORS preflight request and prevent anon users from unsafe methods
Creates an OPTIONS handler that handles any OPTIONS requests that are
not already handled by a handler. CORS has no mechanism to ensure the
user is authenticated, so the Router will reject cross-origin requests
from anon users.

This change allows authenticated users to make cross-origin
requests if they authenticate with OAuth or if
$wgRestAllowCrossOriginCookieAuth is enabled.

Bug: T232176
Bug: T262712
Change-Id: I128b4bdbec4f6bea35142153c951fd7b79617106
2020-09-21 19:29:40 -04:00
..
auth Replace all call_user_func(_array) in all tests 2020-06-06 18:41:20 +02:00
cache cache: Add purges from HtmlCacheUpdater for NS_MEDIAWIKI js/css pages 2020-08-29 04:55:32 +01:00
changes Cleanup of old PHPUnit usage, part 2 2019-10-04 21:47:46 -07:00
composer Replace all new stdClass() with identical (object)[] 2020-03-04 21:18:30 +00:00
config Replace all new stdClass() with identical (object)[] 2020-03-04 21:18:30 +00:00
content ContentHandlerFactory: Inject LoggerInstance instead of using wfDebugLog 2020-06-01 22:37:12 +00:00
debug debug: Assert native deprecation in DeprecatablePropertyArrayTest 2020-06-17 15:23:52 +00:00
deferred Move unit tests, round III 2019-07-09 22:06:59 +02:00
diff Make use of DiffOp::norig/nclosing() and update tests 2020-03-25 15:17:17 +00:00
editpage [EditPage] Move AS_* status constants to a new interface 2020-05-30 11:59:03 -07:00
exception Fix visibility of setUp/tearDown 2020-06-16 21:02:05 +02:00
filebackend mime: Update usage of MimeAnalyzer methods 2020-05-28 20:13:47 +00:00
filerepo/file phpunit: Repair GLOBALS reset in MediaWikiUnitTestCase 2019-09-02 20:58:34 +01:00
GlobalFunctions Add public as visibility in tests folder 2019-10-10 21:55:37 +02:00
HookContainer HookContainer: fix clear() and scopedRegister(). 2020-09-08 21:07:59 +02:00
htmlform Replace all new stdClass() with identical (object)[] 2020-03-04 21:18:30 +00:00
http Split HttpTest and SessionTest to unit and integration 2019-07-13 21:01:09 +02:00
installer Merge "Fix installation failure due to unexpected dbpath under CLI installation" 2019-09-06 17:38:36 +00:00
interwiki tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
jobqueue Return deduplication to CategoryMembershipJob 2019-10-29 06:10:22 +00:00
json Replace all new stdClass() with identical (object)[] 2020-03-04 21:18:30 +00:00
language Fix switch/case indentation per mediawiki coding conventions 2020-07-18 09:17:46 +00:00
libs Support SameSite=None cookies 2020-07-07 02:18:45 +01:00
media tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
Message UserNameUtils: use ITextFormatter instead of MessageLocalizer 2020-04-13 09:28:02 -07:00
objectcache Remove deprecated "legacy" serialization type from RESTBagOStuff 2020-07-13 10:29:47 -05:00
page Add MergeHistoryFactory interface, implemented by PageCommandFactory 2020-05-13 19:08:09 +00:00
parser Drop Sanitizer::escapeId(), deprecated in MediaWiki 1.30 2020-07-29 17:08:45 -04:00
password Fix visibility of setUp/tearDown 2020-06-16 21:02:05 +02:00
preferences MultiTitleFilter: Use prefixed text for form display 2020-06-02 12:23:35 +00:00
registration Hook Container 2020-04-17 15:48:38 +10:00
resourceloader tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
Rest Handle CORS preflight request and prevent anon users from unsafe methods 2020-09-21 19:29:40 -04:00
Revision Create fallback for undefined content models. 2020-07-22 19:59:09 +02:00
revisionlist Add tests for RevisionList/RevisionItem classes 2020-05-12 09:36:44 -07:00
search build: Bump mediawiki-codesniffer to 31.0.0 2020-05-30 14:56:28 +00:00
session Replace all call_user_func(_array) in all tests 2020-06-06 18:41:20 +02:00
shell shell: Fix autodetection of firejail in findFirejail() 2020-07-07 03:18:34 -07:00
skins Replace tabs with spaces 2020-09-04 18:04:07 +02:00
Storage Add mw-reverted change tag 2020-08-31 13:40:50 +00:00
tidy Add additional RemexDriver paragraph-wrapper test 2020-06-12 09:33:31 -05:00
title Fix a plethora of class and function call case mismatches 2020-05-26 14:14:46 +01:00
user Merge "UserEditTracker: Do not try to initialize edit count in read-only mode" 2020-08-05 23:32:50 +00:00
utils Fix visibility of setUp/tearDown 2020-06-16 21:02:05 +02:00
watcheditem Update tests to use PHPUnit 6 class names 2019-10-06 01:01:28 -07:00
BadFileLookupTest.php Fix switch/case indentation per mediawiki coding conventions 2020-07-18 09:17:46 +00:00
DerivativeRequestTest.php Move unit tests, round III 2019-07-09 22:06:59 +02:00
FactoryArgTestTrait.php Create UserGroupManager 2020-06-03 16:46:51 -07:00
FauxResponseTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
FormOptionsInitializationTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
FormOptionsTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
HeaderCallbackTest.php HeaderCallback: Sanitize cookie values in debug logs 2020-06-28 22:17:28 +00:00
LicensesTest.php
PathRouterTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
SanitizerValidateEmailTest.php Move unit tests, round III 2019-07-09 22:06:59 +02:00
ServiceWiringTest.php
SiteConfigurationTest.php SiteConfiguration: Optimise getSetting() internals for getAll() 2020-03-04 02:12:16 +00:00
TitleArrayFromResultTest.php Replace all new stdClass() with identical (object)[] 2020-03-04 21:18:30 +00:00
XmlJsTest.php Move unit tests, round III 2019-07-09 22:06:59 +02:00
XmlSelectTest.php Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00