Fossil SCM
Bring in latest from trunk.
Commit
da070fafe2cced5d808499892f5b32c15d55253e
Parent
6315fd8a3d88641…
5 files changed
-2
+3
-3
+16
+4
+4
-2
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -1340,14 +1340,12 @@ | ||
| 1340 | 1340 | cgi_setenv("HTTP_HOST", zVal); |
| 1341 | 1341 | }else if( fossil_strcmp(zFieldName,"if-none-match:")==0 ){ |
| 1342 | 1342 | cgi_setenv("HTTP_IF_NONE_MATCH", zVal); |
| 1343 | 1343 | }else if( fossil_strcmp(zFieldName,"if-modified-since:")==0 ){ |
| 1344 | 1344 | cgi_setenv("HTTP_IF_MODIFIED_SINCE", zVal); |
| 1345 | -#if 0 | |
| 1346 | 1345 | }else if( fossil_strcmp(zFieldName,"referer:")==0 ){ |
| 1347 | 1346 | cgi_setenv("HTTP_REFERER", zVal); |
| 1348 | -#endif | |
| 1349 | 1347 | }else if( fossil_strcmp(zFieldName,"user-agent:")==0 ){ |
| 1350 | 1348 | cgi_setenv("HTTP_USER_AGENT", zVal); |
| 1351 | 1349 | }else if( fossil_strcmp(zFieldName,"x-forwarded-for:")==0 ){ |
| 1352 | 1350 | const char *zIpAddr = cgi_accept_forwarded_for(zVal); |
| 1353 | 1351 | if( zIpAddr!=0 ){ |
| 1354 | 1352 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1340,14 +1340,12 @@ | |
| 1340 | cgi_setenv("HTTP_HOST", zVal); |
| 1341 | }else if( fossil_strcmp(zFieldName,"if-none-match:")==0 ){ |
| 1342 | cgi_setenv("HTTP_IF_NONE_MATCH", zVal); |
| 1343 | }else if( fossil_strcmp(zFieldName,"if-modified-since:")==0 ){ |
| 1344 | cgi_setenv("HTTP_IF_MODIFIED_SINCE", zVal); |
| 1345 | #if 0 |
| 1346 | }else if( fossil_strcmp(zFieldName,"referer:")==0 ){ |
| 1347 | cgi_setenv("HTTP_REFERER", zVal); |
| 1348 | #endif |
| 1349 | }else if( fossil_strcmp(zFieldName,"user-agent:")==0 ){ |
| 1350 | cgi_setenv("HTTP_USER_AGENT", zVal); |
| 1351 | }else if( fossil_strcmp(zFieldName,"x-forwarded-for:")==0 ){ |
| 1352 | const char *zIpAddr = cgi_accept_forwarded_for(zVal); |
| 1353 | if( zIpAddr!=0 ){ |
| 1354 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1340,14 +1340,12 @@ | |
| 1340 | cgi_setenv("HTTP_HOST", zVal); |
| 1341 | }else if( fossil_strcmp(zFieldName,"if-none-match:")==0 ){ |
| 1342 | cgi_setenv("HTTP_IF_NONE_MATCH", zVal); |
| 1343 | }else if( fossil_strcmp(zFieldName,"if-modified-since:")==0 ){ |
| 1344 | cgi_setenv("HTTP_IF_MODIFIED_SINCE", zVal); |
| 1345 | }else if( fossil_strcmp(zFieldName,"referer:")==0 ){ |
| 1346 | cgi_setenv("HTTP_REFERER", zVal); |
| 1347 | }else if( fossil_strcmp(zFieldName,"user-agent:")==0 ){ |
| 1348 | cgi_setenv("HTTP_USER_AGENT", zVal); |
| 1349 | }else if( fossil_strcmp(zFieldName,"x-forwarded-for:")==0 ){ |
| 1350 | const char *zIpAddr = cgi_accept_forwarded_for(zVal); |
| 1351 | if( zIpAddr!=0 ){ |
| 1352 |
+3
-3
| --- src/http_ssl.c | ||
| +++ src/http_ssl.c | ||
| @@ -176,14 +176,14 @@ | ||
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /* |
| 180 | 180 | ** Open an SSL connection. The identify of the server is determined |
| 181 | -** by global variables that are set using url_parse(): | |
| 181 | +** by variables that are set using url_parse(): | |
| 182 | 182 | ** |
| 183 | -** g.urlName Name of the server. Ex: www.fossil-scm.org | |
| 184 | -** g.urlPort TCP/IP port to use. Ex: 80 | |
| 183 | +** pUrlData->name Name of the server. Ex: www.fossil-scm.org | |
| 184 | +** pUrlData->port TCP/IP port to use. Ex: 80 | |
| 185 | 185 | ** |
| 186 | 186 | ** Return the number of errors. |
| 187 | 187 | */ |
| 188 | 188 | int ssl_open(UrlData *pUrlData){ |
| 189 | 189 | X509 *cert; |
| 190 | 190 |
| --- src/http_ssl.c | |
| +++ src/http_ssl.c | |
| @@ -176,14 +176,14 @@ | |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | /* |
| 180 | ** Open an SSL connection. The identify of the server is determined |
| 181 | ** by global variables that are set using url_parse(): |
| 182 | ** |
| 183 | ** g.urlName Name of the server. Ex: www.fossil-scm.org |
| 184 | ** g.urlPort TCP/IP port to use. Ex: 80 |
| 185 | ** |
| 186 | ** Return the number of errors. |
| 187 | */ |
| 188 | int ssl_open(UrlData *pUrlData){ |
| 189 | X509 *cert; |
| 190 |
| --- src/http_ssl.c | |
| +++ src/http_ssl.c | |
| @@ -176,14 +176,14 @@ | |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | /* |
| 180 | ** Open an SSL connection. The identify of the server is determined |
| 181 | ** by variables that are set using url_parse(): |
| 182 | ** |
| 183 | ** pUrlData->name Name of the server. Ex: www.fossil-scm.org |
| 184 | ** pUrlData->port TCP/IP port to use. Ex: 80 |
| 185 | ** |
| 186 | ** Return the number of errors. |
| 187 | */ |
| 188 | int ssl_open(UrlData *pUrlData){ |
| 189 | X509 *cert; |
| 190 |
+16
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -108,10 +108,26 @@ | ||
| 108 | 108 | ); |
| 109 | 109 | fossil_print("%-13s %s %s\n", zType, zUuid, zDate); |
| 110 | 110 | free(zDate); |
| 111 | 111 | } |
| 112 | 112 | db_finalize(&q); |
| 113 | + } | |
| 114 | + if( zUuid ){ | |
| 115 | + fossil_print("%-13s ", "leaf:"); | |
| 116 | + if(is_a_leaf(rid)){ | |
| 117 | + if(db_int(0, "SELECT 1 FROM tagxref AS tx" | |
| 118 | + " WHERE tx.rid=%d" | |
| 119 | + " AND tx.tagid=%d" | |
| 120 | + " AND tx.tagtype>0", | |
| 121 | + rid, TAG_CLOSED)){ | |
| 122 | + fossil_print("%s\n", "closed"); | |
| 123 | + }else{ | |
| 124 | + fossil_print("%s\n", "open"); | |
| 125 | + } | |
| 126 | + }else{ | |
| 127 | + fossil_print("no\n"); | |
| 128 | + } | |
| 113 | 129 | } |
| 114 | 130 | zTags = info_tags_of_checkin(rid, 0); |
| 115 | 131 | if( zTags && zTags[0] ){ |
| 116 | 132 | fossil_print("tags: %s\n", zTags); |
| 117 | 133 | } |
| 118 | 134 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -108,10 +108,26 @@ | |
| 108 | ); |
| 109 | fossil_print("%-13s %s %s\n", zType, zUuid, zDate); |
| 110 | free(zDate); |
| 111 | } |
| 112 | db_finalize(&q); |
| 113 | } |
| 114 | zTags = info_tags_of_checkin(rid, 0); |
| 115 | if( zTags && zTags[0] ){ |
| 116 | fossil_print("tags: %s\n", zTags); |
| 117 | } |
| 118 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -108,10 +108,26 @@ | |
| 108 | ); |
| 109 | fossil_print("%-13s %s %s\n", zType, zUuid, zDate); |
| 110 | free(zDate); |
| 111 | } |
| 112 | db_finalize(&q); |
| 113 | } |
| 114 | if( zUuid ){ |
| 115 | fossil_print("%-13s ", "leaf:"); |
| 116 | if(is_a_leaf(rid)){ |
| 117 | if(db_int(0, "SELECT 1 FROM tagxref AS tx" |
| 118 | " WHERE tx.rid=%d" |
| 119 | " AND tx.tagid=%d" |
| 120 | " AND tx.tagtype>0", |
| 121 | rid, TAG_CLOSED)){ |
| 122 | fossil_print("%s\n", "closed"); |
| 123 | }else{ |
| 124 | fossil_print("%s\n", "open"); |
| 125 | } |
| 126 | }else{ |
| 127 | fossil_print("no\n"); |
| 128 | } |
| 129 | } |
| 130 | zTags = info_tags_of_checkin(rid, 0); |
| 131 | if( zTags && zTags[0] ){ |
| 132 | fossil_print("tags: %s\n", zTags); |
| 133 | } |
| 134 |
+4
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -472,10 +472,11 @@ | ||
| 472 | 472 | int anonFlag; |
| 473 | 473 | char *zErrMsg = ""; |
| 474 | 474 | int uid; /* User id logged in user */ |
| 475 | 475 | char *zSha1Pw; |
| 476 | 476 | const char *zIpAddr; /* IP address of requestor */ |
| 477 | + const char *zReferer; | |
| 477 | 478 | |
| 478 | 479 | login_check_credentials(); |
| 479 | 480 | sqlite3_create_function(g.db, "constant_time_cmp", 2, SQLITE_UTF8, 0, |
| 480 | 481 | constant_time_cmp_function, 0, 0); |
| 481 | 482 | zUsername = P("u"); |
| @@ -532,10 +533,11 @@ | ||
| 532 | 533 | return; |
| 533 | 534 | } |
| 534 | 535 | } |
| 535 | 536 | } |
| 536 | 537 | zIpAddr = PD("REMOTE_ADDR","nil"); /* Complete IP address for logging */ |
| 538 | + zReferer = P("HTTP_REFERER"); | |
| 537 | 539 | uid = login_is_valid_anonymous(zUsername, zPasswd, P("cs")); |
| 538 | 540 | if( uid>0 ){ |
| 539 | 541 | login_set_anon_cookie(zIpAddr, NULL); |
| 540 | 542 | record_login_attempt("anonymous", zIpAddr, 1); |
| 541 | 543 | redirect_to_g(); |
| @@ -570,10 +572,12 @@ | ||
| 570 | 572 | @ <p>A login is required for <a href="%h(zGoto)">%h(zGoto)</a>.</p> |
| 571 | 573 | } |
| 572 | 574 | form_begin(0, "%R/login"); |
| 573 | 575 | if( zGoto ){ |
| 574 | 576 | @ <input type="hidden" name="g" value="%h(zGoto)" /> |
| 577 | + }else if( zReferer && strncmp(g.zBaseURL, zReferer, strlen(g.zBaseURL))==0 ){ | |
| 578 | + @ <input type="hidden" name="g" value="%h(zReferer)" /> | |
| 575 | 579 | } |
| 576 | 580 | @ <table class="login_out"> |
| 577 | 581 | @ <tr> |
| 578 | 582 | @ <td class="login_out_label">User ID:</td> |
| 579 | 583 | if( anonFlag ){ |
| 580 | 584 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -472,10 +472,11 @@ | |
| 472 | int anonFlag; |
| 473 | char *zErrMsg = ""; |
| 474 | int uid; /* User id logged in user */ |
| 475 | char *zSha1Pw; |
| 476 | const char *zIpAddr; /* IP address of requestor */ |
| 477 | |
| 478 | login_check_credentials(); |
| 479 | sqlite3_create_function(g.db, "constant_time_cmp", 2, SQLITE_UTF8, 0, |
| 480 | constant_time_cmp_function, 0, 0); |
| 481 | zUsername = P("u"); |
| @@ -532,10 +533,11 @@ | |
| 532 | return; |
| 533 | } |
| 534 | } |
| 535 | } |
| 536 | zIpAddr = PD("REMOTE_ADDR","nil"); /* Complete IP address for logging */ |
| 537 | uid = login_is_valid_anonymous(zUsername, zPasswd, P("cs")); |
| 538 | if( uid>0 ){ |
| 539 | login_set_anon_cookie(zIpAddr, NULL); |
| 540 | record_login_attempt("anonymous", zIpAddr, 1); |
| 541 | redirect_to_g(); |
| @@ -570,10 +572,12 @@ | |
| 570 | @ <p>A login is required for <a href="%h(zGoto)">%h(zGoto)</a>.</p> |
| 571 | } |
| 572 | form_begin(0, "%R/login"); |
| 573 | if( zGoto ){ |
| 574 | @ <input type="hidden" name="g" value="%h(zGoto)" /> |
| 575 | } |
| 576 | @ <table class="login_out"> |
| 577 | @ <tr> |
| 578 | @ <td class="login_out_label">User ID:</td> |
| 579 | if( anonFlag ){ |
| 580 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -472,10 +472,11 @@ | |
| 472 | int anonFlag; |
| 473 | char *zErrMsg = ""; |
| 474 | int uid; /* User id logged in user */ |
| 475 | char *zSha1Pw; |
| 476 | const char *zIpAddr; /* IP address of requestor */ |
| 477 | const char *zReferer; |
| 478 | |
| 479 | login_check_credentials(); |
| 480 | sqlite3_create_function(g.db, "constant_time_cmp", 2, SQLITE_UTF8, 0, |
| 481 | constant_time_cmp_function, 0, 0); |
| 482 | zUsername = P("u"); |
| @@ -532,10 +533,11 @@ | |
| 533 | return; |
| 534 | } |
| 535 | } |
| 536 | } |
| 537 | zIpAddr = PD("REMOTE_ADDR","nil"); /* Complete IP address for logging */ |
| 538 | zReferer = P("HTTP_REFERER"); |
| 539 | uid = login_is_valid_anonymous(zUsername, zPasswd, P("cs")); |
| 540 | if( uid>0 ){ |
| 541 | login_set_anon_cookie(zIpAddr, NULL); |
| 542 | record_login_attempt("anonymous", zIpAddr, 1); |
| 543 | redirect_to_g(); |
| @@ -570,10 +572,12 @@ | |
| 572 | @ <p>A login is required for <a href="%h(zGoto)">%h(zGoto)</a>.</p> |
| 573 | } |
| 574 | form_begin(0, "%R/login"); |
| 575 | if( zGoto ){ |
| 576 | @ <input type="hidden" name="g" value="%h(zGoto)" /> |
| 577 | }else if( zReferer && strncmp(g.zBaseURL, zReferer, strlen(g.zBaseURL))==0 ){ |
| 578 | @ <input type="hidden" name="g" value="%h(zReferer)" /> |
| 579 | } |
| 580 | @ <table class="login_out"> |
| 581 | @ <tr> |
| 582 | @ <td class="login_out_label">User ID:</td> |
| 583 | if( anonFlag ){ |
| 584 |
+4
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -2,10 +2,14 @@ | ||
| 2 | 2 | |
| 3 | 3 | <h2>Changes For Version 1.29 (as yet unreleased)</h2> |
| 4 | 4 | * Add the ability to display content and diffs for UTF16 text files |
| 5 | 5 | in the web interface. |
| 6 | 6 | * Honor timezones in imports from git. |
| 7 | + * The [/reports] page now requires Read ("o") permissions. The "byweek" | |
| 8 | + report now properly propagates the selected year through the event type | |
| 9 | + filter links. | |
| 10 | + * The [/help/info | info command] now shows leaf status of the checkout. | |
| 7 | 11 | |
| 8 | 12 | <h2>Changes For Version 1.28 (2014-01-27)</h2> |
| 9 | 13 | * Enhance [/help?cmd=/reports | /reports] to support event type filtering. |
| 10 | 14 | * When cloning a repository, the user name passed via the URL (if any) |
| 11 | 15 | is now used as the default local admin user's name. |
| 12 | 16 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -2,10 +2,14 @@ | |
| 2 | |
| 3 | <h2>Changes For Version 1.29 (as yet unreleased)</h2> |
| 4 | * Add the ability to display content and diffs for UTF16 text files |
| 5 | in the web interface. |
| 6 | * Honor timezones in imports from git. |
| 7 | |
| 8 | <h2>Changes For Version 1.28 (2014-01-27)</h2> |
| 9 | * Enhance [/help?cmd=/reports | /reports] to support event type filtering. |
| 10 | * When cloning a repository, the user name passed via the URL (if any) |
| 11 | is now used as the default local admin user's name. |
| 12 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -2,10 +2,14 @@ | |
| 2 | |
| 3 | <h2>Changes For Version 1.29 (as yet unreleased)</h2> |
| 4 | * Add the ability to display content and diffs for UTF16 text files |
| 5 | in the web interface. |
| 6 | * Honor timezones in imports from git. |
| 7 | * The [/reports] page now requires Read ("o") permissions. The "byweek" |
| 8 | report now properly propagates the selected year through the event type |
| 9 | filter links. |
| 10 | * The [/help/info | info command] now shows leaf status of the checkout. |
| 11 | |
| 12 | <h2>Changes For Version 1.28 (2014-01-27)</h2> |
| 13 | * Enhance [/help?cmd=/reports | /reports] to support event type filtering. |
| 14 | * When cloning a repository, the user name passed via the URL (if any) |
| 15 | is now used as the default local admin user's name. |
| 16 |