[Bio] / FigKernelPackages / Tracer.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Tracer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20, Mon Aug 15 21:23:17 2005 UTC revision 1.21, Tue Aug 16 20:21:51 2005 UTC
# Line 9  Line 9 
9      use CGI;      use CGI;
10      use FIG_Config;      use FIG_Config;
11      use PageBuilder;      use PageBuilder;
12        use Digest::MD5;
13    
14  =head1 Tracing and Debugging Helpers  =head1 Tracing and Debugging Helpers
15    
# Line 1314  Line 1315 
1315    
1316  Certain CGI scripts are too dangerous to exist in the production  Certain CGI scripts are too dangerous to exist in the production
1317  environment. This method provides a simple way to prevent them  environment. This method provides a simple way to prevent them
1318  from working unless they are explicitly turned on in the configuration  from working unless they are explicitly turned on by creating a password
1319  file by setting C<$FIG_Config::debug_mode> to 1. If debugging mode  cookie via the B<SetPassword> script.  If debugging mode
1320  is not turned on, an error web page will be output.  is not turned on, an error web page will be output.
1321    
1322  =cut  =cut
1323    
1324  sub DebugMode {  sub DebugMode {
1325      # Declare the return variable.      # Declare the return variable.
1326      my $retVal;      my $retVal = 0;
1327      # Check the debug configuration.      # Check the debug configuration.
1328      if (1) { # $FIG_Config::debug_mode) {      my $password = CGI::cookie("DebugMode");
1329        my $encrypted = Digest::MD5::md5_hex($password);
1330        if ($encrypted eq "252dec43280e0c0d6a75ffcec486e61d") {
1331          $retVal = 1;          $retVal = 1;
1332      } else {      } else {
1333          # Here debug mode is off, so we generate an error page.          # Here debug mode is off, so we generate an error page.

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3