|
| 1 | +# See bottom of file for license and copyright information |
| 2 | +package Foswiki::Configure::Checkers::AuthRealm; |
| 3 | + |
| 4 | +use strict; |
| 5 | +use warnings; |
| 6 | + |
| 7 | +use Foswiki::Configure::Checker (); |
| 8 | +our @ISA = ('Foswiki::Configure::Checker'); |
| 9 | + |
| 10 | +sub check { |
| 11 | + my $this = shift; |
| 12 | + |
| 13 | + if ( !$Foswiki::cfg{AuthRealm} ) { |
| 14 | + return $this->ERROR( |
| 15 | +'Please make sure you enter an Authentication Realm. This is required for registration to work.' |
| 16 | + ); |
| 17 | + } |
| 18 | + |
| 19 | + if (( $Foswiki::cfg{AuthRealm} =~ /\:/ ) and |
| 20 | +# ($Foswiki::cfg{AuthRealm} eq 'Foswiki::LoginManager::ApacheLogin') and |
| 21 | + ($Foswiki::cfg{Htpasswd}{Encoding} eq 'md5')) { |
| 22 | + return $this->ERROR("Digest auth (md5) password files store the AuthRealm in the password file, which uses ':' (colons) as the data separator. Please remove the colon from the Setting."); |
| 23 | + } |
| 24 | + return ''; |
| 25 | +} |
| 26 | + |
| 27 | +1; |
| 28 | +__END__ |
| 29 | +Foswiki - The Free and Open Source Wiki, http://foswiki.org/ |
| 30 | +
|
| 31 | +Copyright (C) 2008-2010 Foswiki Contributors. Foswiki Contributors |
| 32 | +are listed in the AUTHORS file in the root of this distribution. |
| 33 | +NOTE: Please extend that file, not this notice. |
| 34 | +
|
| 35 | +Additional copyrights apply to some or all of the code in this |
| 36 | +file as follows: |
| 37 | +
|
| 38 | +Copyright (C) 2000-2006 TWiki Contributors. All Rights Reserved. |
| 39 | +TWiki Contributors are listed in the AUTHORS file in the root |
| 40 | +of this distribution. NOTE: Please extend that file, not this notice. |
| 41 | +
|
| 42 | +This program is free software; you can redistribute it and/or |
| 43 | +modify it under the terms of the GNU General Public License |
| 44 | +as published by the Free Software Foundation; either version 2 |
| 45 | +of the License, or (at your option) any later version. For |
| 46 | +more details read LICENSE in the root of this distribution. |
| 47 | +
|
| 48 | +This program is distributed in the hope that it will be useful, |
| 49 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 50 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 51 | +
|
| 52 | +As per the GPL, removal of this notice is prohibited. |
0 commit comments