Bawolff created this task. Bawolff added projects: MediaWiki-extensions-WikibaseRepository, Maps (Kartographer), ContentSecurityPolicy. Restricted Application added a subscriber: Aklapper. Restricted Application added a project: Wikidata.
TASK DESCRIPTION In 889716e13798 <https://phabricator.wikimedia.org/rEKAR889716e13798b98949da3ee306a3dcf5f03eeda8> Kartographer was changed to automatically add the map server to the CSP source list for pages that include a map on them. However this doesn't seem to work for Wikidata, due to `Wikibase\Repo\ParserOutput\GlobeCoordinateKartographerDataUpdater::updateParserOutput` not copying that data over. This wouldn't affect anything in production (Because CSP is not in use yet, but also the plan is to whitelist all of *.wikimedia.org just generally). However, this is breaking things on beta wiki. My suggested fix would be: diff --git a/repo/includes/ParserOutput/GlobeCoordinateKartographerDataUpdater.php b/repo/includes/ParserOutput/GlobeCoordinateKartographerDataUpdater.php index a6963cc409..6a79c92ba5 100644 --- a/repo/includes/ParserOutput/GlobeCoordinateKartographerDataUpdater.php +++ b/repo/includes/ParserOutput/GlobeCoordinateKartographerDataUpdater.php @@ -81,6 +81,11 @@ class GlobeCoordinateKartographerDataUpdater implements StatementDataUpdater { $parserOutput->addModules( $kartographerParserOutput->getModules() ); $parserOutput->addModuleStyles( $kartographerParserOutput->getModuleStyles() ); + $srcs = $kartographerParserOutput->getExtraCSPDefaultSrcs(); + foreach( $srcs as $src ) { + $parserOutput->addExtraCSPDefaultSrc( $src ); + } + $parserOutput->setExtensionData( 'kartographer', $kartographerParserOutput->getExtensionData( 'kartographer' ) However, I'm not sure if that would work during preview. I also haven't tested this as of yet. Alternatively, it may make sense to use `ParserOutput::mergeInternalMetaDataFrom`, so that this is less coupled to internal implementation details. TASK DETAIL https://phabricator.wikimedia.org/T248278 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bawolff Cc: hoo, Aklapper, Bawolff, Alilje, darthmon_wmde, Nabetaro, DannyS712, Nandana, MSantos, Lahi, Gq86, Looniverse, GoranSMilovanovic, QZanden, Orienteerix, LawExplorer, Ddproxy, _jensen, rosalieper, JGirault, Scott_WUaS, phabyogi, GAllegre, Susannaanas, ferdbold, lxbarth, Planemad, Wikidata-bugs, aude, Yurik, Jdforrester-WMF, Mbch331, Rxy, Jay8g
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs