Page MenuHomePhabricator

1️⃣ Introduce size limit for downloading URL sources
Open, Needs TriagePublic

Description

This task addresses the security risk that was identified, see comment from @Mstyles

Task description;

Details

Event Timeline

Thanks again, @Mstyles, for your assessment of https://phabricator.wikimedia.org/T431716!

We've created this ticket to mititgate the high risk issue. To be able to confidently proceed with the work, we'd appreciate a review of the patch when it's ready and a confirmation whether it adequately addresses the high risk issue you have found. Following that, would you then change the risk rating ?

This work is part of DE1.1. CCing @VPuffetMichel just in case confirmation from her is needed.

T438740 and T435916 could also potentially mitigate risk here. However I'm waiting from feedback from the API team regarding whether to implement these.

Thanks @Mvolz ! Those tickets sound like they would provide additional security and the infrastructure could be used to apply additional safeguards in the future. We will go forward with size-check the Citoid patch to achieve some defense-in-depth and not depend on the schedule of the API team

lilients_WMDE renamed this task from Introduce size limit for downloading URL sources to 3️⃣ Introduce size limit for downloading URL sources.Oct 1 2026, 7:56 AM

Change #1305893 had a related patch set uploaded (by Svantje Lilienthal; author: WMDE-Fisch):

[mediawiki/services/citoid@master] Add size limit for fetching responses

https://gerrit.wikimedia.org/r/1305893

lilients_WMDE renamed this task from 3️⃣ Introduce size limit for downloading URL sources to 4️⃣ Introduce size limit for downloading URL sources.Oct 6 2026, 9:02 AM
lilients_WMDE renamed this task from 4️⃣ Introduce size limit for downloading URL sources to Introduce size limit for downloading URL sources.Tue, Oct 20, 9:26 AM
lilients_WMDE renamed this task from Introduce size limit for downloading URL sources to 1️⃣ Introduce size limit for downloading URL sources.Mon, Oct 26, 11:01 AM

I'm quite happy with this patch now. I'm just unsure, what the default size limit should be. Currently the patch sets a random number of 100MB. We could probably reduce it to 50, 25 or 10. Without PDFs even 1 MB seems a lot for "just" scraping a HTML page.

Any thoughts on that @Mvolz ? We could also start with an arbitrary number like now and then log what we're running into.

Change #1305893 merged by jenkins-bot:

[mediawiki/services/citoid@master] Add size limit for fetching responses

https://gerrit.wikimedia.org/r/1305893