Procedure Information for wsCgi.tcl:

  1. cgiBomb
  2. cgiWarn
  3. safeImport
  4. authHeader
  5. sessionManager
  6. cgiSetup
  7. wsHelpButton
  8. inputVerify


    Procedure: cgiBomb

    Procedure to handle bombs gracefully and send output through CGI


    Procedure Data

    • Name: cgiBomb
    • Parent Namespace: webSubmit::cgi
    • Arglist: proc string
    • Return: None


    Argument definitions:

    • proc : Name of procedure in which bomb occurred
    • string : String to return in bomb error message


    Procedure: cgiWarn

    Procedure to generate warning messages


    Procedure Data

    • Name: cgiWarn
    • Parent Namespace: webSubmit::cgi
    • Arglist: proc string
    • Return: None


    Argument definitions:

    • proc : Name of procedure in which warning was issued
    • string : String to return in warning message


    Procedure: safeImport

    Procedure to prevent manipulation of variables outside the allowed bounds (for example, environment variables). The procedure constructs a list of valid variables and then imports them into the calling scope.


    Procedure Data

    • Name: safeImport
    • Parent Namespace: webSubmit::cgi
    • Arglist: {reqVarList ""}
    • Return: List of valid imported variables


    Argument definitions:

    • reqVarList (Optional): List of variables that *must* be in import list (Default = "")


    Procedure: authHeader

    Procedure to generate authorization header


    Procedure Data

    • Name: authHeader
    • Parent Namespace: webSubmit::cgi
    • Arglist:
    • Return: None


    Argument definitions:



    Procedure: sessionManager

    Procedure to place session manager data into a module or form


    Procedure Data

    • Name: sessionManager
    • Parent Namespace: webSubmit::cgi
    • Arglist: moduleName
    • Return: None


    Argument definitions:

    • moduleName : Name of current module (used for namedSessList)


    Procedure: cgiSetup

    Procedure to import a group of variables and get session data for a module


    Procedure Data

    • Name: cgiSetup
    • Parent Namespace: webSubmit::cgi
    • Arglist: moduleName moduleVarList {reqVarList ""}
    • Return:


    Argument definitions:

    • moduleName : Name of the module to process
    • moduleVarList : List of variables in the module
    • reqVarList (Optional): List of variables that *must* be in import list (Default = "")


    Procedure: wsHelpButton

    Procedure to generate a Help button


    Procedure Data

    • Name: wsHelpButton
    • Parent Namespace: webSubmit::cgi
    • Arglist: helpURL
    • Return: CGI code to generate link button


    Argument definitions:

    • helpURL : URL for relevant help document


    Procedure: inputVerify

    Procedure to verify CGI input based on a series of criteria. Each variable is tested for one or more criteria, and a list of error messages is generated if any variables fail. Data for variables and the tests to be performed are stored in an input array with the following structure INPUT(varList) : List of variables to be checked INPUT($var) : List of tests to be performed for variable $var INPUT($var,$test,$arg1) : Argument $arg1 to test $test for variable $var . . . INPUT($var,$test,$argn) : Argument $argn to test $test for variable $var


    Procedure Data

    • Name: inputVerify
    • Parent Namespace: webSubmit::cgi
    • Arglist: arrName
    • Return: None (bombs if any variables do not meet requirements)


    Argument definitions:

    • arrName : Name of the array containing data about variables and tests