Eflyjason has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399770 )

Change subject: [WikiImporter::notice] use wfDebug instead of echo in notice()
......................................................................

[WikiImporter::notice] use wfDebug instead of echo in notice()

Make the default notice implementation of notice() function to
send the notice to wfDebug() instead of simply echo to prevent XSS

Bug: T177997
Change-Id: I9ffb597e0642afc1603cdd15e2d09c6f2584b448
---
M includes/import/WikiImporter.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/70/399770/1

diff --git a/includes/import/WikiImporter.php b/includes/import/WikiImporter.php
index 28f3f82..252a39c 100644
--- a/includes/import/WikiImporter.php
+++ b/includes/import/WikiImporter.php
@@ -125,7 +125,8 @@
                if ( is_callable( $this->mNoticeCallback ) ) {
                        call_user_func( $this->mNoticeCallback, $msg, $params );
                } else { # No ImportReporter -> CLI
-                       echo wfMessage( $msg, $params )->text() . "\n";
+                       // T177997: the command line importers should call 
setNoticeCallback() for their own custom callback to echo the notice
+                       wfDebug( wfMessage( $msg, $params )->text() . "\n" );
                }
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/399770
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ffb597e0642afc1603cdd15e2d09c6f2584b448
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Eflyjason <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to