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/deposit.dm

    r22559 r28888  
    6767_httpconf_ {_gwcgi_?e=_compressedoptions_&p=conf}
    6868_httpbild_ {_gwcgi_?e=_compressedoptions_&p=bild}
    69 _httpview_ {_gwcgi_?a=p&p=about&c=_cgiargdi1dirname_}
     69_httpview_ {_gwcgi_?a=p&p=about&c=_cgiargdi1dirnameUrlsafe_}
    7070_httpdel_  {javascript:do\_delete();}
    7171_httpexpt_ {_gwcgi_?e=_compressedoptions_&p=expt}
     
    156156#_di1md.Creator_ {_If_("_:cgiargdi1md.Creator_" eq  "_cgiargdi1md.Creator_",_cgiargdi1md.Creator_,)}
    157157#_di1md.Description_ {_If_("_:cgiargdi1md.Description_" eq  "_cgiargdi1md.Description_",_cgiargdi1md.Description_,)}
    158 #_di1md.Subject_ {_If_("_:cgiargdi1md.Subject_" eq "_cgiargdi1md.Subject_",_cgiargdi1md.Subject,)}
     158#_di1md.Subject_ {_If_("_:cgiargdi1md.Subject_" eq "_cgiargdi1md.Subject_",_cgiargdi1md.Subject_,)}
    159159
    160160_step1scriptextra_ {
     
    230230
    231231<input type=hidden name="e" value="_decodedcompressedoptions_">
    232 <input type=hidden name="p" value="_cgiargp_">
     232<input type=hidden name="p" value="_cgiargpAttrsafe_">
    233233
    234234
     
    261261#######################################################################
    262262
    263 _userfile_ {_If_("_:cgiargdi1userfile_" eq  "_cgiargdi1userfile_",_cgiargdi1userfile_,)}
     263_userfile_ {_If_("_:cgiargdi1userfile_" eq  "_cgiargdi1userfile_",_cgiargdi1userfileAttrsafe_,)}
    264264
    265265_step2scriptextra_ {
     
    275275<form name="depositorform" method=post action="_gwcgi_" enctype="multipart/form-data">
    276276<input type=hidden name="e" value="_decodedcompressedoptions_">
    277 <input type=hidden name="p" value="_cgiargp_">
     277<input type=hidden name="p" value="_cgiargpAttrsafe_">
    278278<center>
    279279<table width=_pagewidth_>
     
    311311<form name="depositorform" method=post action="_gwcgi_" enctype="multipart/form-data">
    312312<input type=hidden name="e" value="_decodedcompressedoptions_">
    313 <input type=hidden name="p" value="_cgiargp_">
     313<input type=hidden name="p" value="_cgiargpAttrsafe_">
    314314<center>
    315315<table width=_pagewidth_>
     
    348348<form name="depositorform" method=post action="_gwcgi_">
    349349<input type=hidden name="e" value="_decodedcompressedoptions_">
    350 <input type=hidden name="p" value="_cgiargp_">
     350<input type=hidden name="p" value="_cgiargpAttrsafe_">
    351351
    352352<frameset rows="*,160" border=0>
     
    450450<form name="depositorform" method=post action="_gwcgi_">
    451451<input type=hidden name="e" value="_decodedcompressedoptions_">
    452 <input type=hidden name="p" value="_cgiargp_">
     452<input type=hidden name="p" value="_cgiargpAttrsafe_">
    453453
    454454</form>
     
    573573<form name="depositorform" method=post action="_gwcgi_">
    574574<input type=hidden name="e" value="_decodedcompressedoptions_">
    575 <input type=hidden name="p" value="_cgiargp_">
     575<input type=hidden name="p" value="_cgiargpAttrsafe_">
    576576
    577577</form>
Note: See TracChangeset for help on using the changeset viewer.