aboutsummaryrefslogtreecommitdiffstats
path: root/includes/logging
Commit message (Collapse)AuthorAgeFilesLines
...
* | LogEventsList: always define $pageNamePetr Pchelko2021-05-131-1/+5
| | | | | | | | | | Bug: T282834 Change-Id: I0162bdd72a4a8c5e2a694474a60539a0a7dcd844
* | LogPager: replace Title in method signaturesdaniel2021-05-072-27/+36
|/ | | | | Bug: T278459 Change-Id: Icd273b598fefe5e5d18aef4e4d12adfbf88e291a
* Allow action blocks to be logged via block log parameterstsepothoabala2021-05-051-0/+11
| | | | | Bug: T279560 Change-Id: Icd6ba193a2ce7af83a074cd135470a5097638791
* Replace uses of DB_MASTER with DB_PRIMARYJames D. Forrester2021-04-293-5/+5
| | | | | | Just an auto-replace from codesniffer for now. Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
* Stop using legacy ActorMigration field "log_user"Tim Starling2021-04-283-25/+34
| | | | | Bug: T278917 Change-Id: I1b78bad7e1fa43f5f82908567a7daad9c6cc79b9
* Stop using legacy ActorMigration field "rc_user"Tim Starling2021-04-281-11/+6
| | | | | Bug: T278917 Change-Id: I4d6c175c637a2cb26c63e0b2b27d5ea8ce6b1e0d
* User: use ActorNormalization to insert actorPetr Pchelko2021-04-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | While creating users, we have several interesting corner cases: - When creating a new User, we actually rely on the 'unique' constraint on actor_name. This is important if something calls 'User::createNew' with a name that is already occupied by an existing anon actor with no user. This is quite a weird corner case, but there's a test for that. We could probably assimilate this nicly in actor store by checking whether the user id in the database for the actor we found is the same as user id in the passed in user identity. - Even more interesting use-case is 'subsuming' existing actors with reserved user names. When we call User::newSystemUser, and there is already an actor with the same reserved name, we 'subsume' that actor and take over it's actor_id for our new system user. This can now be done with an upsert. This state of having reserved actor with no user is not easy to cause, but imports or updating from old MW versions seem to be able to produce this state. Archeology revealed that 'subsuming' existing actor was added for installer. Change-Id: I16b2f088217db0283215fc2ef5fb04a3742e1626
* Move several legacy style rules to existing dedicated modulesmainframe982021-03-261-1/+1
| | | | | | | | | | | | | | These are often two or three css rules and can be included in the style sheets of other modules. To facilitate a good migration from mw-warning-with-logexcerpt, mw-logevent-loglines has been added to the log event list of LogEventsList, to allow styling previously provided under mw-warning-with-logexcerpt to be selected only in cases where the styles should actually be applied. See also T278002. Bug: T278576 Change-Id: I3f45c95d2856c8fce2da5175b52089d4e629a41e
* Convert LogPage to UserIdentityPetr Pchelko2021-03-231-11/+13
| | | | Change-Id: Ifb353dc5e0a90a2dc01c1b196fc83696e39b4b8d
* Deprecate UserIdentity::getActorId()daniel2021-03-132-16/+15
| | | | | | | Note: User::getActorId() is not (yet) deprecated. Bug: T274179 Change-Id: Ic2ca6d489db821fc2334e53bf2496c7b0d3ea5b1
* Convert RecentChange::doMarkPatrolled to AuthorityPetr Pchelko2021-03-031-2/+4
| | | | Change-Id: If93d6133f61bf0801bbe979885e2fb120e01a33d
* Merge "Deprecate LogEntry::getPerformer in favor of ::getPerformerIdentity"jenkins-bot2021-03-013-3/+9
|\
| * Deprecate LogEntry::getPerformer in favor of ::getPerformerIdentityVadim Kovalenko2021-03-013-3/+9
| | | | | | | | | | | | Bug: T274329 Depends-On: Ide485fb8f9a0a22d2d7fc7a3bbbe458f603db393 Change-Id: I1921ba8586e2d56a9669803532ade5ee2c4c3b56
* | Merge "Convert ChangeTags public interface to Authority."jenkins-bot2021-03-011-1/+1
|\ \ | |/ |/|
| * Convert ChangeTags public interface to Authority.Petr Pchelko2021-02-241-1/+1
| | | | | | | | | | Bug: T275507 Change-Id: I3b7f99391ab299df2b046a2878010cf6afe7fed7
* | Convert logging namespace to AuthorityPetr Pchelko2021-02-239-76/+30
|/ | | | Change-Id: Icb44acf275a7f9231c4d229b3886ed8a36d5cbd4
* Introduce LogEntry::getPerformerIdentity and deprecate ::getPerformerVadim Kovalenko2021-02-174-9/+26
| | | | | Bug: T274329 Change-Id: I3dadb20f076494f7b46f0647ea3a8bfbbdaa59da
* Use static closures where safe to useUmherirrender2021-02-111-2/+2
| | | | | | | | | This is micro-optimization of closure code to avoid binding the closure to $this where it is not needed. Created by I25a17fb22b6b669e817317a0f45051ae9c608208 Change-Id: I0ffc6200f6c6693d78a3151cb8cea7dce7c21653
* build: Update mediawiki/mediawiki-codesniffer to 35.0.0Umherirrender2021-01-311-1/+1
| | | | Change-Id: Idb413be4b8cba8611afdc022af59810ce1a4531e
* LogEventsList: Remove unused propertyAmmarpad2021-01-201-6/+0
| | | | | | | Deprecated and unused. No class is extending LogEventsList, so it can't possibly be in use elsewhere. Change-Id: I7781c06c8382103e774486717d643f8868670a3f
* Relax User to UserIdentity in ManualLogEntry and RecentChangeDaimona Eaytoy2021-01-101-5/+12
| | | | | | | | This is obviously incomplete, but it should allow unit-testing in some situations. Both these classes are ancient and should be refactored, so there's probably no point in pushing this further for now. Change-Id: Ie5563490cdc84cfa50b5248c248f0fd282de6075
* Check for the index name while it's being renamedAmir Sarabadani2021-01-051-1/+4
| | | | | Bug: T271259 Change-Id: If434ce229fbd06b958fbda407fb2ca54410a47c6
* Improve documentation of ManualLogEntryGergő Tisza2021-01-021-5/+17
| | | | | | | | | ManualLogEntry is the class to use when logging custom events from an extension, so it is one of the places where a developer might look for information on how to add a new log event type. Improve the documentation of that somewhat. Change-Id: I8cbc498aa2d9b3612a60b4070a14ed1d51fee15a
* build: Enable SecurityCheck-DoubleEscaped and suppress issuesUmherirrender2020-12-301-0/+1
| | | | | | | | | | | | This issue type was globally suppressed in I849ac4f120fd15b483e8939d4db45c98dc351259 to make reviewer easier. This adds inline suppressions or @suppress directives on function docs for false positives, mostly restoring those removed in I849ac4f120fd15b483e8939d4db45c98dc351259 Bug: T231311 Change-Id: I1b1d814bd907e9d49fcc39f777982936574fc7c6
* build: Enable phan-taint-check-plugin and suppress issuesUmherirrender2020-12-303-0/+5
| | | | | | | | | | | | | | | | | | Taint check checks for possible security issues by tracking html escaping and more by using phan. This slows done the phan-job a bit and requires more ram Keep the DoubleEscaped issues out to make reviewer easier Adds suppression for false positives Adds taint-annotation to help taint-check Removes suppression for code phan now understand better by the tracking of keys in taint-check Fix some small issues by adding int cast or htmlspecialchars calls Bug: T216348 Bug: T268920 Change-Id: I849ac4f120fd15b483e8939d4db45c98dc351259
* Reflect name change of logging indexes in codeAmmarpad2020-12-231-2/+2
| | | | | | Bug: T270769 Follow-Up: I17028bba489d04b01d22c39dc8935a4f0f771c7e Change-Id: I9d820dbd315fb793ccdb8b5591240328686a8c2e
* LogPager: if `log_id` is set, don't use public exclude clauseDannyS7122020-12-161-2/+5
| | | | | | | | Allow viewing private logs, like suppression, from just the logid (if the user can see them) Bug: T269761 Change-Id: Ief2f31c2339c3866d7629c5d09d8ec5caef3d960
* taint-check: Set raw taints on Message::rawParamUmherirrender2020-12-131-1/+2
| | | | | | | | Also add taint for LogFormatter::makePageLink similiar to LogFormatter::makeUserLink to avoid false positives as the return of this function is mostly wrapped in Message::rawParam Change-Id: Iab770702fd3a1d20f25f54057770dc03e28f1b0e
* Merge "Fixed mixed escaping in Language::translateBlockExpiry"jenkins-bot2020-12-071-1/+1
|\
| * Fixed mixed escaping in Language::translateBlockExpiryUmherirrender2020-12-071-1/+1
| | | | | | | | | | Bug: T268938 Change-Id: I44c12b9676610e596254b68b829ac62bc109cdde
* | Pass escaped html to LogFormatter::makePageLink for sanityUmherirrender2020-12-071-2/+2
|/ | | | | Bug: T268938 Change-Id: Ib6847d56eb2d1c19f695f50327c9a58d8d8603da
* Suppress taint-check issues in LogFormatter/LogPageUmherirrender2020-11-282-0/+2
| | | | | Bug: T216348 Change-Id: I1d224c46bb81864b75b3f079975e63be1f533e26
* Merge "Inject services into SpecialLog"jenkins-bot2020-11-202-17/+37
|\
| * Inject services into SpecialLogUmherirrender2020-10-262-17/+37
| | | | | | | | | | | | | | | | This covers only directly used services by this special page and pager Services used by the base class are not part of this patch set Bug: T259960 Change-Id: Ib4b5edf6b4c56ef626875df8d95496225cddf501
* | Do not create title when calling LinkBatch in pagersUmherirrender2020-11-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Title::makeTitleSafe is expensive and there is no need to create the title to just pass namespace and dbkey to the LinkBatch The underscore/space normalisation is done in LinkBatch::add Also combine the linkbatch on Special:Undelete, because the user of files are often the same as of the (null) revision On Special:Log use log_user_text for the preload, it is always set Change-Id: Iff8797df11d18107005402ba88b4a0e4beb3dd7d
* | Implement links-in-logs script, linking LogEventsList rows to log entriesDannyS7122020-11-141-3/+12
| | | | | | | | | | Bug: T207562 Change-Id: Icb9405a5f9491bfe4c639b5fe5b8799cab8b35da
* | Merge "Update a lot of unspecific "array" types in PHPDocs"jenkins-bot2020-11-132-2/+3
|\ \
| * | Update a lot of unspecific "array" types in PHPDocsThiemo Kreuz2020-10-282-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This includes fixing some mistakes, as well as removing redundant text that doesn't add new information, either because it literally repeats what the code already says, or is actually duplicated. Change-Id: I3a8dd8ce57192deda8916cc444c87d7ab1a36515
* | | Remove documentation that literally repeats the codeThiemo Kreuz2020-10-271-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, documenting the method getUser() with "get the User object" does not add any information that's not already there. But I have to read the text first to understand that it doesn't document anything that's not already obvious from the code. Some of this is from a time when we had a PHPCS sniff that was complaining when a line like `@param User $user` doesn't end with some descriptive text. Some users started adding text like `@param User $user The User` back then. Let's please remove this. Change-Id: I0ea8d051bc732466c73940de9259f87ffb86ce7a
* | SpecialEmailUser/LogPage: Improve docAmmar Abdulhamid2020-10-231-1/+2
| | | | | | | | | | | | Remove reference to deprecated method so as to stop showing up in search Change-Id: I5f4af6331f12e8d95151c74781cf5507ca920c8a
* | Language: hard deprecate the `noSeparators` parameter to ::formatNumC. Scott Ananian2020-10-212-2/+2
|/ | | | | | | | | | | | | Code should use Language::formatNumNoSeparators() instead, which has existed since MW 1.21. Code search: https://codesearch.wmcloud.org/search/?q=formatNum%5C%28%5B%5E%29%5D*%2C&i=nope&files=&repos= Depends-On: I95c365e2535bb3c47bed69a9b702c8f13d9fab87 Depends-On: I012434d5f6c749fec45a6c160e8d5d03686192e9 Depends-On: If3de5645a92514f605d4117fea3a820ed6c86624 Change-Id: I58a66975e505f16d8db5d663a9ca225535277983
* LogEventList::userCanViewLogType() accepts a string not an stdClassDavid Barratt2020-10-101-1/+1
| | | | | | | The LogEventList::userCanViewLogType() method accepts a string, but is documented as accepting a stdClass. This change fixes the documentation. Change-Id: I410f7cef58a2c89f5a15fd047cc703a90b0812ab
* Merge "Document hook names in hook interfaces."jenkins-bot2020-10-025-0/+15
|\
| * Document hook names in hook interfaces.daniel2020-09-275-0/+15
| | | | | | | | | | Bug: T258665 Change-Id: Ifddbf57f8aa2e3eb0d5845601376cbafa08ed407
* | Fix typos related to repeated wordsUmherirrender2020-09-271-1/+1
|/ | | | Change-Id: Ibc187d95b003017255bc87adf56afae7a59bd3db
* SECURITY: Unescaped message used in HTML within LogEventsListsbassett2020-09-241-8/+3
| | | | | | | | | | | | * Use options-messages instead of text() for messages used to build HTML multi-select field. * Clean up old FIXME conditional since T199657 has been resolved for over a year now. CVE-2020-25815 Bug: T256171 Change-Id: Ib8f95f5510320f7fc2163625214c3c198be5941a
* Use ::class to refer HTML form field classesUmherirrender2020-09-191-5/+5
| | | | Change-Id: Ie5248123cb0facdad896339def502bcd31a47565
* Merge "CSS 'class' names can be an array in Html::…element"jenkins-bot2020-09-101-1/+1
|\
| * CSS 'class' names can be an array in Html::…elementThiemo Kreuz2020-09-081-1/+1
| | | | | | | | Change-Id: I301d23066b19051b9e1cb9363639f6189a8b173c
* | Remove support for LogEventsList::userCan* functions without a userDannyS7122020-09-101-21/+6
| | | | | | | | | | Bug: T245704 Change-Id: I947dfa910fda448282407c6ba340405f9efdf57e