This reverts commit cbde6b69de to re-apply
the initial patch. This should only be merged once
I2acfd0b7a1e48aec107ded3bbe4963e2df24f4d3 is deployed.
Change-Id: If12ab65b1d773946fca6c8601ff51290136549c8
This reverts commit ec22840c4a.
This patch currently creates issues on beta, which still runs with the
latest vendor version of Parsoid. If, for some reason, Parsoid doesn't
get deployed with this patch, I2acfd0b7a1e48aec107ded3bbe4963e2df24f4d3
doesn't get included, and the REST page handler breaks.
Staggered deploy seems safer in this context, hence the proposal for a
temporary revert, and a merge after the next Parsoid vendor patch is
deployed.
Change-Id: I3f859fa807a04892a67323cd4e98be0d3fbb1676
* Parsoid's rt-testing script is still a node.js script and hence needs
ucs2 offests for its syntactic / semantic diff classification.
* So, we cannot let 1aa71cf5 ride the train since it will break
Parsoid's rt-testing. We'll figure out an alternative way of handling
it, but for now, I am reverting that part of the patch.
* Document in the ParsoidHandlerTest test that ucs2 offsets are used and
cannot be changed to 'byte'
Bug: T347426
Change-Id: Ifa833e01ef117d7bcd6da1c7eb542535192662eb
CVE-2023-PENDING
reduce the edit count if a user for a given revision is suppress-deleted
Bug: T341529
Change-Id: I79539464cf3500065cb4f42e1542ff5feec31395
They are passed to Language::formatTimePeriod(), which accepts floats.
Phan recently learned to enforce these annotations.
Change-Id: I3e7bb0f4a79fd563b94b738bb63541da986bb87a
The Helper classes are deprecated since 1afd52e3e4.
Depends-On: I2acfd0b7a1e48aec107ded3bbe4963e2df24f4d3
Change-Id: Ie9973c6d6474bb7b4720c0641ca7492dc946d923
It was a bit hard to follow where the attribute names were generated.
Also give names to $tag[0] and $tag[1].
Change-Id: I0267e478a84d68853e7b8d60fac92936cd48600b
rvcontentformat was deprecated in 07842be without replacement,
but it allows to control the expected output format of the content for
the client.
This is only useful for content handler with different formats,
like ProofreadPage's proofread-index format (supports wikitext and json)
or Wikibase's wikibase-property (supports json and php)
Bug: T174032
Bug: T321446
Change-Id: I4e0cde9c2d5c2857028e6dfa2b96ba9070a7fa8e
This creates a new language code, 'x-xss', which is enabled using the
setting $wgUseXssLanguage (similar to how $wgUsePigLatinVariant enables
the 'en-x-piglatin' language code, and likewise defaults to false; will
be enabled in development settings soon).
In this language code, all messages become “malicious”, trying to run
some alert() JavaScript; if any alert() actually fires in the browser,
the message was not escaped properly. ($wgRawHtmlMessages are exempt,
since they’re already known to be “unsafe” and require more rights to
edit on-wiki.) Messages that are not escaped properly are generally a
minor security issue; they effectively let a user with 'editinterface'
right (such as a sysop, on many wikis) run arbitrary JS, without needing
the 'editsitejs' right (normally restricted to interface admins).
Developers can use this language code to more easily check their code
for escaping issues / cross-site scripting vulnerabilities.
Bug: T340201
Change-Id: Ia9a1cf712b139fea5da72046e37035e6de39d8d5
* Deprecate ::setProfileID(). This was added in r17776 to allow callers
(e.g. LocalSettings.php and StartProfiler.php, outside Git) to change
the ID at runtime. Site admins don't seem to do this in practice.
We have since then introduced request IDs, and the ability to
declaratively describe the Profiler singleton via $wgProfiler,
where 'profileID' is already supported nowadays.
The propertly can stil be set for other purposes by sub-classes.
* Remove ::setContext() and ::getContext() which was already hard
deprecated a while ago (1.38).
* Deprecate ::getAllowOutput() which is unused.
* Profiler::$context has been removed too since the methods consuming
this member has been removed.
Change-Id: Id2ff252e506d4445e68e1e944d44f3b4b0bdbdb4
Note that row() and rows() cannot be described with annotations, and
they need to be hardcoded in taint-check instead
(I7623ba5112bfffbcf972cc366e0db99ee75b448e).
Also annotate SelectQueryBuilder::caller(), as a follow-up to
Ic9fb15e083cca75c2b5c6bddd1df87b148acca6e.
Bug: T253380
Change-Id: Id4a884f5b91683d3946c712ac4149ffe855d7683
The $rows parameter is too complex for annotations:
- Only the keys are tainted, but not the values.
- The single-row and multi-row cases need to be handled separately.
Neither of these can be described with annotations. Therefore, the
taintedness of this methods needs to remain hardcoded in the plugin
itself.
Bug: T290563
Change-Id: Ib7147e9b2cd99431a009b4bd4a9b0a2036f3f5b4