sanitize nickname derived from email address

master
Joey Hess 2015-05-14 10:40:52 -04:00
parent b831d4a6f1
commit 4fc4e78cd8
1 changed files with 4 additions and 1 deletions

View File

@ -1467,7 +1467,10 @@ sub openiduser ($) {
sub emailuser ($) {
my $user=shift;
if (defined $user && $user =~ m/(.+)@/) {
return $1;
my $nick=$1;
# remove any characters from not allowed in wiki files
$nick=~s/[^$config{wiki_file_chars}]/_/g;
return $nick;
}
return;
}