Fossil SCM
When redirecting to /xfer, make sure the PATH_INFO actually exists. Update the cgi_replace_parameter() routine to make sure the parameter being replaced already exists.
Commit
e5b72926206b0659157c3c81b471f84ecab10f86
Parent
16ec6e558bf28c7…
1 file changed
+2
+2
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -427,12 +427,14 @@ | ||
| 427 | 427 | void cgi_replace_parameter(const char *zName, const char *zValue){ |
| 428 | 428 | int i; |
| 429 | 429 | for(i=0; i<nUsedQP; i++){ |
| 430 | 430 | if( strcmp(aParamQP[i].zName,zName)==0 ){ |
| 431 | 431 | aParamQP[i].zValue = zValue; |
| 432 | + return | |
| 432 | 433 | } |
| 433 | 434 | } |
| 435 | + cgi_set_parameter_nocopy(zName, zValue); | |
| 434 | 436 | } |
| 435 | 437 | |
| 436 | 438 | /* |
| 437 | 439 | ** Add a query parameter. The zName portion is fixed but a copy |
| 438 | 440 | ** must be made of zValue. |
| 439 | 441 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -427,12 +427,14 @@ | |
| 427 | void cgi_replace_parameter(const char *zName, const char *zValue){ |
| 428 | int i; |
| 429 | for(i=0; i<nUsedQP; i++){ |
| 430 | if( strcmp(aParamQP[i].zName,zName)==0 ){ |
| 431 | aParamQP[i].zValue = zValue; |
| 432 | } |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | /* |
| 437 | ** Add a query parameter. The zName portion is fixed but a copy |
| 438 | ** must be made of zValue. |
| 439 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -427,12 +427,14 @@ | |
| 427 | void cgi_replace_parameter(const char *zName, const char *zValue){ |
| 428 | int i; |
| 429 | for(i=0; i<nUsedQP; i++){ |
| 430 | if( strcmp(aParamQP[i].zName,zName)==0 ){ |
| 431 | aParamQP[i].zValue = zValue; |
| 432 | return |
| 433 | } |
| 434 | } |
| 435 | cgi_set_parameter_nocopy(zName, zValue); |
| 436 | } |
| 437 | |
| 438 | /* |
| 439 | ** Add a query parameter. The zName portion is fixed but a copy |
| 440 | ** must be made of zValue. |
| 441 |