Roxen.git / server / modules / scripting / perl.pike

version» Context lines:

Roxen.git/server/modules/scripting/perl.pike:1:   #include <module.h>   inherit "module";   inherit "roxenlib";      // Perl script and tag handler module.   // by Leif Stensson.      string cvs_version = -  "$Id: perl.pike,v 2.19 2001/03/13 15:13:54 leif Exp $"; +  "$Id: perl.pike,v 2.20 2001/08/08 12:40:53 leif Exp $";      constant module_type = MODULE_FILE_EXTENSION | MODULE_TAG;      constant module_name = "Perl support";   constant module_doc =    "This module provides a faster way of running Perl scripts with Roxen. "    "The module also optionally provides a &lt;perl&gt;..&lt;/perl&gt; "    "container to run Perl code from inside RXML pages.";      static string recent_error = 0;
Roxen.git/server/modules/scripting/perl.pike:145:    ExtScript.periodic_cleanup();    call_out(periodic, 900);   }      void start()   { fix_settings();    call_out(periodic, 900);   }      mixed handle_file_extension(Stdio.File file, string ext, object id) - { object h = gethandler(); + { +  object h = gethandler();       if (id->realfile && stringp(id->realfile))    { array result;       NOCACHE();       if (!h) return http_string_answer("<h1>Script support failed.</h1>");       mixed bt = catch (result = h->run(id->realfile, id));   
Roxen.git/server/modules/scripting/perl.pike:192:    default:    return http_string_answer("SCRIPT ERROR: "    "bad output mode configured.\n");    }    }    else    { return http_string_answer(sprintf("RESULT: %O", result));    }    }    -  return http_string_answer("FOO!"); -  + #if 1 +  return http_string_answer("Script file not accessible in this filesystem " +  "(no real file)."); + #else +  // Possible security leak allowing people to read the contents +  // of script files.    return 0; -  + #endif   }      constant simpletag_perl_flags = 0;      mixed simpletag_perl(string tag, mapping attr, string contents, object id,    RXML.Frame frame)   {    if (!QUERY(tagenable))    RXML.run_error("<perl>...</perl> tag not enabled in this server.");