Skip to content

Commit 9fb7950

Browse files
moygitster
authored andcommitted
git-remote-mediawiki: don't include HTTP login/password in author
On the MediaWiki side, the author information is just the MediaWiki login of the contributor. The import turns it into login@$wiki_name to create the author's email address on the wiki side. But we don't want this to include the HTTP password if it's present in the URL ... Signed-off-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1d6abac commit 9fb7950

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/mw-to-git/git-remote-mediawiki

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ $dumb_push = ($dumb_push eq "true");
109109

110110
my $wiki_name = $url;
111111
$wiki_name =~ s/[^\/]*:\/\///;
112+
# If URL is like http://user:[email protected]/, we clearly don't
113+
# want the password in $wiki_name. While we're there, also remove user
114+
# and '@' sign, to avoid author like MWUser@[email protected]
115+
$wiki_name =~ s/^.*@//;
112116

113117
# Commands parser
114118
my $entry;

0 commit comments

Comments
 (0)