Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fixed fossil_strcmp() usage in cgi_init() when in JSON mode. Through some extremely serendipitous fluke, its broken usage just happened to work until a bit was removed from that function in [ec56c69f] which, purely coincidentally, caused the bug (mine, from 2011!) to start triggering when x-www-form-urlencoded forms were submitted (login/logout). Before that, the buggy block never got a chance to trigger for those forms. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
115a70b2df921ce64e0483fe6236417d |
| User & Date: | stephan 2019-07-31 12:21:37.522 |
Context
|
2019-08-01
| ||
| 14:17 | Add the FOSSIL_URI environment variable to the CGI extension mechanism. ... (check-in: 7b2b9d6995 user: drh tags: trunk) | |
|
2019-07-31
| ||
| 12:21 | Fixed fossil_strcmp() usage in cgi_init() when in JSON mode. Through some extremely serendipitous fluke, its broken usage just happened to work until a bit was removed from that function in [ec56c69f] which, purely coincidentally, caused the bug (mine, from 2011!) to start triggering when x-www-form-urlencoded forms were submitted (login/logout). Before that, the buggy block never got a chance to trigger for those forms. ... (check-in: 115a70b2df user: stephan tags: trunk) | |
| 08:09 | Merged in autosetupAndJimTcl branch (autosetup updates). ... (check-in: 51d006f851 user: stephan tags: trunk) | |
Changes
Changes to src/cgi.c.
| ︙ | ︙ | |||
989 990 991 992 993 994 995 |
blob_zero(&g.cgiIn);
if( len>0 && zType ){
if( fossil_strcmp(zType, "application/x-fossil")==0 ){
blob_read_from_channel(&g.cgiIn, g.httpIn, len);
blob_uncompress(&g.cgiIn, &g.cgiIn);
}
#ifdef FOSSIL_ENABLE_JSON
| | | | | 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 |
blob_zero(&g.cgiIn);
if( len>0 && zType ){
if( fossil_strcmp(zType, "application/x-fossil")==0 ){
blob_read_from_channel(&g.cgiIn, g.httpIn, len);
blob_uncompress(&g.cgiIn, &g.cgiIn);
}
#ifdef FOSSIL_ENABLE_JSON
else if( fossil_strcmp(zType, "application/json")==0
|| fossil_strcmp(zType,"text/plain")==0/*assume this MIGHT be JSON*/
|| fossil_strcmp(zType,"application/javascript")==0){
g.json.isJsonMode = 1;
cgi_parse_POST_JSON(g.httpIn, (unsigned int)len);
/* FIXMEs:
- See if fossil really needs g.cgiIn to be set for this purpose
(i don't think it does). If it does then fill g.cgiIn and
refactor to parse the JSON from there.
|
| ︙ | ︙ |