Skip to content

Commit

Permalink
Merge branch 'master' into Item14414
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Jun 10, 2017
2 parents 48d35ac + 811c971 commit 5338160
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 11 additions & 1 deletion TopicUserMappingContrib/lib/Foswiki/Users/TopicUserMapping.pm
Expand Up @@ -411,12 +411,16 @@ m/^\s+\*\s($Foswiki::regex{webNameRegex}\.)?($Foswiki::regex{wikiWordRegex})\s*(
$odate = ''
unless $odate =~ m/^\d+[- .\/]+[A-Za-z0-9]+[- .\/]+\d+$/;
$insidelist = 1;

#print STDERR "1: Found $web.$name.$odate $insidelist\n";
}
elsif ( $line =~ m/^\s+\*\s([A-Z]) - / ) {
elsif ( $line =~ m/^\s+\*\s([[:upper:]]) - / ) {

# * A - <a name="A">- - - -</a>^M
$name = $1;
$insidelist = 1;

#print STDERR "2: Found $name $insidelist\n";
}
elsif ( $insidelist == 1 ) {

Expand All @@ -426,20 +430,26 @@ m/^\s+\*\s($Foswiki::regex{webNameRegex}\.)?($Foswiki::regex{wikiWordRegex})\s*(
# in all alphabets
$insidelist = 2;
$name = '';

#print STDERR "3: Found $name $insidelist\n";
}
if ( ( $name && ( NFKD($wikiname) le NFKD($name) ) )
|| $insidelist == 2 )
{

#print STDERR "4: Found $wikiname le $name || $insidelist\n";
# found alphabetical position or last record
if ( $wikiname eq $name ) {

#print STDERR "5: Found $wikiname eq $name\n";

next if ( $action eq 'del' );

# adjusting existing user - keep original registration date
$entry .= $odate;
}
else {
print STDERR "6: Appending $today to $entry NL $line \n";
$entry .= $today . "\n" . $line;
}

Expand Down
5 changes: 3 additions & 2 deletions core/lib/Foswiki/Users/HtPasswdUser.pm
Expand Up @@ -354,7 +354,8 @@ sub _readPasswd {
elsif ( length($tPass) eq 0 && !$fields[0]
|| $fields[0] =~ m/@/ )
{
$data->{$hID}->{enc} = 'sha';
# Password is zero length, no way to determine encoding.
$data->{$hID}->{enc} = 'unknown';
}

if ( $data->{$hID}->{enc} ) {
Expand Down Expand Up @@ -847,7 +848,7 @@ sub checkPassword {
my ( $pw, $entry ) = $this->fetchPass($login);

# $pw will be 0 if there is no pw
return 0 unless defined $pw;
return 0 unless defined $pw && length($pw);

my $encryptedPassword = $this->encrypt( $login, $password, 0, $entry );
return 0 unless ($encryptedPassword);
Expand Down

0 comments on commit 5338160

Please sign in to comment.