{"thread":{"id":"28727","subject":"[PATCH] git-remote-mediawiki: don't include HTTP login/password in author","startedAt":"2011-10-20T17:04:59Z","lastAt":"2011-10-20T17:04:59Z","messageCount":1,"participants":["Matthieu Moy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"178092","messageId":"1319130299-13259-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"28727","inReplyTo":null,"subject":"[PATCH] git-remote-mediawiki: don't include HTTP login/password in author","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2011-10-20T17:04:59Z","receivedAt":"2011-10-20T17:04:59Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"On the MediaWiki side, the author information is just the MediaWiki login\nof the contributor. The import turns it into login@$wiki_name to create\nthe author's email address on the wiki side. But we don't want this to\ninclude the HTTP password if it's present in the URL ...\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n contrib/mw-to-git/git-remote-mediawiki |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/mw-to-git/git-remote-mediawiki b/contrib/mw-to-git/git-remote-mediawiki\nindex 0b32d18..c18bfa1 100755\n--- a/contrib/mw-to-git/git-remote-mediawiki\n+++ b/contrib/mw-to-git/git-remote-mediawiki\n@@ -109,6 +109,10 @@ $dumb_push = ($dumb_push eq \"true\");\n \n my $wiki_name = $url;\n $wiki_name =~ s/[^\\/]*:\\/\\///;\n+# If URL is like http://user:password@example.com/, we clearly don't\n+# want the password in $wiki_name. While we're there, also remove user\n+# and '@' sign, to avoid author like MWUser@HTTPUser@host.com\n+$wiki_name =~ s/^.*@//;\n \n # Commands parser\n my $entry;\n-- \n1.7.7.140.ge3099\n"}]}