Ignore:
Timestamp:
2014-03-13T14:34:48+13:00 (10 years ago)
Author:
ak19
Message:

First security commit. 1. Introducing the new securitools.h and .cpp files, which port the functions necessary to implement security in Greenstone from OWASP-ESAPI for Java, since OWASP's C++ version is largely not yet implemented, even though their code compiles. The newly added runtime-src/packages/security which contains OWASP ESAPI for C++ will therefore be removed again shortly. 2. receptionist.cpp now sets various web-encoded variants for each cgiarg macro, such as HTML entity encoded, attr encoded, javascript encoded (and css encoded variants). These are now used in the macro files based on which variant is suited to the context. 3. This commit further contains the minimum changes to protect the c, d, and p cgi variables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/macros/style.dm

    r28497 r28888  
    240240    \}
    241241
    242     var un = "_cgiargun_";
    243     var ky = "_cgiargky_";
    244     var gsapi = new GSAjaxAPI("_gwcgi_","_cgiargc_","_cgiargun_","_cgiargky_");
     242    var un = "_cgiargunJssafe_";
     243    var ky = "_cgiargkyJssafe_";
     244    var gsapi = new GSAjaxAPI("_gwcgi_","_cgiargcJssafe_","_cgiargunJssafe_","_cgiargkyJssafe_");
    245245   
    246246    // http://stackoverflow.com/questions/6312993/javascript-seconds-to-time-with-format-hhmmss
     
    261261
    262262    // else, if we have a usercommentdiv, we would have a docid. Get toplevel section of the docid
    263     var doc_id = "_cgiargd_"; //escape("_cgiargd_");
     263    var doc_id = "_cgiargdJssafe_"; //escape("cgiargd");
    264264    var period = doc_id.indexOf(".");
    265265    if(period != -1) \{
Note: See TracChangeset for help on using the changeset viewer.