Changeset 433 for trunk


Ignore:
Timestamp:
Jul 5, 2013, 9:40:07 AM (11 years ago)
Author:
djay
Message:

Fixed in trunk (r433): correct behavior when cookie are set by external applications #79.

Location:
trunk/zoo-project
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/HISTORY.txt

    r417 r433  
     1Version 1.3.0-rc2
     2  * Fix POST Request issue (ticket #34)
     3  * Fix COOKIE gesture (ticket #79)
     4
    15Version 1.3.0-rc1
    26
  • trunk/zoo-project/zoo-kernel/zoo_service_loader.c

    r418 r433  
    21202120    int hasValidCookie=-1;
    21212121    char *tcook=strdup(cgiCookie);
     2122    char *tmp=NULL;
     2123    int hasVal=-1;
     2124    map* testing=getMapFromMaps(m,"main","cookiePrefix");
     2125    if(testing==NULL){
     2126      tmp=strdup("ID=");
     2127    }else{
     2128      tmp=(char*)malloc((strlen(testing->value)+2)*sizeof(char));
     2129      sprintf(tmp,"%s=",testing->value);
     2130      hasVal=1;
     2131    }
    21222132    if(strstr(cgiCookie,";")!=NULL){
    21232133      char *token,*saveptr;
    21242134      token=strtok_r(cgiCookie,";",&saveptr);
    21252135      while(token!=NULL){
    2126         if(strcasestr(token,"ID=")!=NULL){
     2136        if(strcasestr(token,tmp)!=NULL){
    21272137          if(tcook!=NULL)
    21282138            free(tcook);
     
    21332143      }
    21342144    }else{
    2135       if(strstr(cgiCookie,"=")!=NULL && strcasestr(cgiCookie,"ID=")!=NULL){
     2145      if(strstr(cgiCookie,"=")!=NULL && strcasestr(cgiCookie,tmp)!=NULL){
    21362146        tcook=strdup(cgiCookie);
    21372147        hasValidCookie=1;
     2148      }
     2149      if(tmp!=NULL){
     2150        free(tmp);
    21382151      }
    21392152    }
     
    21572170        addMapsToMaps(&m,tmpSess);
    21582171        freeMaps(&tmpSess);
    2159       }else{
    2160         errorException(m, _("Unable to read your session file."), "InternalError");
    21612172        free(tmpSess);
    2162         freeService(&s1);
    2163         free(s1);
    2164         freeMaps(&m);
    2165         free(m);
    2166         freeMaps(&request_input_real_format);
    2167         free(request_input_real_format);
    2168         freeMaps(&request_output_real_format);
    2169         free(request_output_real_format);
    2170         free(REQUEST);
    2171         free(SERVICE_URL);
    2172         return 1;
    21732173      }
    2174       free(tmpSess);
    21752174    }
    21762175  }
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png