Ignore:
Timestamp:
2008-12-17T15:57:59+13:00 (15 years ago)
Author:
oranfry
Message:

changing the library servlet code for checking the el, href and rl query arguments, which until now would see el=direct as the same as elx=direct or elephant=direct - i.e. it would be satisfied as long as the first part of the argument name was correct. It is appropriate to expect an exact match so check for 'el=' instead of just 'el' and so on

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/src/java/org/greenstone/gsdl3/LibraryServlet.java

    r18223 r18234  
    286286      String rl = null;
    287287      for (int i=0;i<query_arr.length;i++){
    288         if (query_arr[i].startsWith("el")){
     288        if (query_arr[i].startsWith("el=")){
    289289          if (query_arr[i].substring(query_arr[i].indexOf("=")+1,query_arr[i].length()).equals("direct")){
    290290            redirect = true;
    291291          }
    292         }else if(query_arr[i].startsWith("href")){
     292        }else if(query_arr[i].startsWith("href=")){
    293293          href = query_arr[i].substring(query_arr[i].indexOf("=")+1,query_arr[i].length());
    294294          href = href.replaceAll("%2f", "/");
     
    296296          href = href.replaceAll("%3f", "?");
    297297          href = href.replaceAll("%3A", "\\:");
    298         }else if(query_arr[i].startsWith("rl")){
     298        }else if(query_arr[i].startsWith("rl=")){
    299299          rl = query_arr[i].substring(query_arr[i].indexOf("=")+1,query_arr[i].length());
    300300        }
Note: See TracChangeset for help on using the changeset viewer.