[Bio] / FigWebServices / Emergency.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/Emergency.cgi

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

revision 1.17, Thu May 1 07:55:01 2008 UTC revision 1.18, Mon May 5 21:39:32 2008 UTC
# Line 121  Line 121 
121      if (! $key) {      if (! $key) {
122          die "No tracing key specified.";          die "No tracing key specified.";
123      }      }
124      # Turn on our internal tracing.      # Insure we come from a safe place. Safe places include this server and
125        # the NMPDR development server. Get the referring URL and parse out the host
126        # name. Note that we presume the host is three parts (xxx.yyy.zzz), because
127        # that is true of all our machines, and that there's a slash at the end of
128        # the name, because we are supposed to be coming from a wiki script.
129        my $source = $ENV{HTTP_REFERER};
130        if ($source !~ m#([^/.]+\.[^/.]+\.[^/.]+)/#) {
131            die "Invalid referrer $source.";
132        } elsif ($1 ne $FIG_Config::dev_server && $1 ne $ENV{HTTP_HOST}) {
133            die "Access denied for $source";
134        } else {
135            # Configure our internal tracing, if necessary.
136      if ($cgi->param('innerTracing')) {      if ($cgi->param('innerTracing')) {
137          TSetup("3 LogReader Tracer", ">$FIG_Config::temp/EmergencyDiagnostics.log");          TSetup("3 LogReader Tracer", ">$FIG_Config::temp/EmergencyDiagnostics.log");
138      } else {      } else {
# Line 222  Line 233 
233          StartPage("Tracing Console Error", []);          StartPage("Tracing Console Error", []);
234          FormatError("Unknown tracing command $action.");          FormatError("Unknown tracing command $action.");
235      }      }
236        }
237  };  };
238    
239  if ($@) {  if ($@) {

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3