Changeset 33041


Ignore:
Timestamp:
2019-04-30T13:17:47+12:00 (2 years ago)
Author:
kjdon
Message:

tomcat 8 strict on unsafe chars. Use the new makeURLComponentSafe for berry baskets and document baskets etc to escape the hhf param ( no idea what this param does..)

Location:
main/trunk/greenstone3/web/interfaces/default/js
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/berrybasket/berrybasket.js

    r32307 r33041  
    2020   
    2121    var request_type = "GET";
    22     var url = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=ItemNum&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&c=";
     22    var url = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=ItemNum&o=XML&hhf="+makeURLComponentSafe("[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]")+"&c=";
    2323
    2424    var responseSuccess = function(o){
     
    291291
    292292function addBerry(el){
    293     var addurl = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=" + el.id;
     293    var addurl = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&hhf="+makeURLComponentSafe("[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]")+"&poo=1&s1.item=" + el.id;
    294294
    295295    var addSuccess = function(o){
  • main/trunk/greenstone3/web/interfaces/default/js/berrybasket/ygDDPlayer.js

    r25728 r33041  
    124124
    125125var request_type = "GET";
    126 var addurlPath = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=";
    127 var delurlPath = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=DeleteItem&c=&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=";
     126var addurlPath = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&hhf="+makeURLComponentSafe("[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]")+"&s1.item=";
     127var delurlPath = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=DeleteItem&c=&o=XML&hhf="+makeURLComponentSafe("[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]")+"&s1.item=";
    128128var postdata = null;
    129129
  • main/trunk/greenstone3/web/interfaces/default/js/documentbasket/documentBasketDragDrop.js

    r25284 r33041  
    124124
    125125var request_type = "GET";
    126 var docAddurlPath = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=AddDocument&c=&s1.id=2&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=";
    127 var docDelurlPath = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=DeleteDocument&c=&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=";
     126var docAddurlPath = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=AddDocument&c=&s1.id=2&o=XML&hhf="+makeURLComponentSafe("[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]")+"&s1.item=";
     127var docDelurlPath = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=DeleteDocument&c=&o=XML&hhf="+makeURLComponentSafe("[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]")+"&s1.item=";
    128128var postdata = null;
    129129
  • main/trunk/greenstone3/web/interfaces/default/js/documentbasket/documentbasket.js

    r25284 r33041  
    1818   
    1919    var request_type = "GET";
    20     var url = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=GetDocuments&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&c=";
     20    var url = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=GetDocuments&o=XML&hhf="+makeURLComponentSafe("[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]")+"&c=";
    2121
    2222    var responseSuccess = function(o){
     
    7676function clearBasket()
    7777{
    78     var delurlPath = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=ClearDocuments&c=&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.c=" + gs.cgiParams.c;
     78    var delurlPath = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=ClearDocuments&c=&o=XML&hhf="+makeURLComponentSafe("[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]")+"&s1.c=" + gs.cgiParams.c;
    7979    var callback =
    8080    {
     
    278278
    279279function addDocument(el){
    280     var addurl = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=AddDocument&c=&s1.id=2&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=" + el.id;
     280    var addurl = gs.xsltParams.library_name + "?a=pr&rt=r&ro=1&s=AddDocument&c=&s1.id=2&o=XML&hhf="+makeURLComponentSafe("[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]")+"&s1.item=" + el.id;
    281281
    282282    var addSuccess = function(o){
  • main/trunk/greenstone3/web/interfaces/default/js/documentmaker_scripts.js

    r31748 r33041  
    7171        }
    7272        callback.currentLink = docLinks[i];
    73         YAHOO.util.Connect.asyncRequest("GET", docLinks[i].getAttribute("href").concat('&dmd=true&excerptid=gs-document-text&hhf=[{"name":"Cache-Control", "value":"no-cache"}]'), callback);
     73        YAHOO.util.Connect.asyncRequest("GET", docLinks[i].getAttribute("href").concat('&dmd=true&excerptid=gs-document-text&hhf='+makeURLComponentSafe('[{"name":"Cache-Control", "value":"no-cache"}]')), callback);
    7474    }
    7575
Note: See TracChangeset for help on using the changeset viewer.