Skip to content

Commit

Permalink
Item1518: please people NEVER do 2-argument open. Ever :) Also avoid …
Browse files Browse the repository at this point in the history
…globals for filehandle

git-svn-id: http://svn.foswiki.org/branches/Release01x01@11610 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OlivierRaginel authored and OlivierRaginel committed May 3, 2011
1 parent efb3a04 commit 787a11f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/lib/Foswiki/Users/HtPasswdUser.pm
Expand Up @@ -231,16 +231,16 @@ sub _savePasswd {

unless (-e "$Foswiki::cfg{Htpasswd}{FileName}" ) {
# Item4544: Document special format used in .htpasswd for email addresses
open( FILE, ">$Foswiki::cfg{Htpasswd}{FileName}.README" ) ||
open( my $readme, '>', "$Foswiki::cfg{Htpasswd}{FileName}.README" ) or
throw Error::Simple( $Foswiki::cfg{Htpasswd}{FileName}.
'.README open failed: '.$! );

print FILE "# Foswiki uses a specially crafted .htpasswd file format that should not be\n";
print FILE "# manipulated using a standard htpasswd utility or loss of registered emails might occur..\n";
print FILE "# (3rd-party utilities do not support the email address format used by Foswiki).\n";
print FILE "# \n";
print FILE "# More information available at: http://foswiki.org/System/UserAuthentication.\n";
close( FILE);
print $readme "# Foswiki uses a specially crafted .htpasswd file format that should not be\n";
print $readme "# manipulated using a standard htpasswd utility or loss of registered emails might occur..\n";
print $readme "# (3rd-party utilities do not support the email address format used by Foswiki).\n";
print $readme "# \n";
print $readme "# More information available at: http://foswiki.org/System/UserAuthentication.\n";
close( $readme );
}

my $content = _dumpPasswd($db);
Expand Down

0 comments on commit 787a11f

Please sign in to comment.