Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Back out the main-url patch. On second thought, this does not add a lot of value but does introduce complication. Maybe it will get added back in later. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
5bb4f12a8fedd4f47cba5f54bab00bd8 |
| User & Date: | drh 2021-08-17 19:44:31.555 |
Context
|
2021-08-18
| ||
| 18:18 | In the attachment list of /wiki, link the word Attachments to the /attachlist page as a workaround for downloading the attachments using their expected names (rather than change the historical behaviour of the in-page links, which download using artifact IDs). Discussed in [forum:6566f665a3685c4f | forum post 6566f665a3685c4f]. check-in: 6e44230314 user: stephan tags: trunk | |
|
2021-08-17
| ||
| 19:44 | Back out the main-url patch. On second thought, this does not add a lot of value but does introduce complication. Maybe it will get added back in later. check-in: 5bb4f12a8f user: drh tags: trunk | |
| 17:32 | Provide a warning on the security-audit page if any of the TH1 scripts that run during a syncm, push, pull, or clone are configured. check-in: cfb5be4189 user: drh tags: trunk | |
| 17:13 | Add the "main-url" setting. Use it to send the "pragma from-url" on a sync. The server uses this to add new syncwith: entries for the client. check-in: 2ae7a5160f user: drh tags: trunk | |
Changes
Changes to src/setup.c.
| ︙ | ︙ | |||
1052 1053 1054 1055 1056 1057 1058 | @ a convenient place for newbies @ to download a ZIP archive or a tarball of the project. By default, @ the latest trunk check-in is downloaded. Change this tag to something @ else (ex: release) to alter the behavior of the /download page. @ (Property: "download-tag") @ </p> @ <hr /> | < < < < < < < < < < | 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 |
@ a convenient place for newbies
@ to download a ZIP archive or a tarball of the project. By default,
@ the latest trunk check-in is downloaded. Change this tag to something
@ else (ex: release) to alter the behavior of the /download page.
@ (Property: "download-tag")
@ </p>
@ <hr />
entry_attribute("Index Page", 60, "index-page", "idxpg", "/home", 0);
@ <p>Enter the pathname of the page to display when the "Home" menu
@ option is selected and when no pathname is
@ specified in the URL. For example, if you visit the url:</p>
@
@ <blockquote><p>%h(g.zBaseURL)</p></blockquote>
@
|
| ︙ | ︙ |
Changes to src/xfer.c.
| ︙ | ︙ | |||
1575 1576 1577 1578 1579 1580 1581 |
if( blob_eq(&xfer.aToken[1], "send-private") ){
login_check_credentials();
if( !g.perm.Private ){
server_private_xfer_not_authorized();
}else{
xfer.syncPrivate = 1;
}
| < > < > < > | 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 |
if( blob_eq(&xfer.aToken[1], "send-private") ){
login_check_credentials();
if( !g.perm.Private ){
server_private_xfer_not_authorized();
}else{
xfer.syncPrivate = 1;
}
}
/* pragma send-catalog
**
** The client wants to see igot cards for all known artifacts.
** This is used as part of "sync --verily" to help ensure that
** no artifacts have been missed on prior syncs.
*/
if( blob_eq(&xfer.aToken[1], "send-catalog") ){
xfer.resync = 0x7fffffff;
}
/* pragma client-version VERSION ?DATE? ?TIME?
**
** The client announces to the server what version of Fossil it
** is running. The DATE and TIME are a pure numeric ISO8601 time
** for the specific check-in of the client.
*/
if( xfer.nToken>=3 && blob_eq(&xfer.aToken[1], "client-version") ){
xfer.remoteVersion = atoi(blob_str(&xfer.aToken[2]));
if( xfer.nToken>=5 ){
xfer.remoteDate = atoi(blob_str(&xfer.aToken[3]));
xfer.remoteTime = atoi(blob_str(&xfer.aToken[4]));
@ pragma server-version %d(RELEASE_VERSION_NUMBER) \
@ %d(MANIFEST_NUMERIC_DATE) %d(MANIFEST_NUMERIC_TIME)
}
}
/* pragma uv-hash HASH
**
** The client wants to make sure that unversioned files are all synced.
** If the HASH does not match, send a complete catalog of
** "uvigot" cards.
*/
|
| ︙ | ︙ | |||
1624 1625 1626 1627 1628 1629 1630 |
@ pragma uv-push-ok
}else if( g.perm.Read ){
@ pragma uv-pull-only
}
send_unversioned_catalog(&xfer);
}
uvCatalogSent = 1;
| < > | 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 |
@ pragma uv-push-ok
}else if( g.perm.Read ){
@ pragma uv-pull-only
}
send_unversioned_catalog(&xfer);
}
uvCatalogSent = 1;
}
/* pragma ci-lock CHECKIN-HASH CLIENT-ID
**
** The client wants to make non-branch commit against the check-in
** identified by CHECKIN-HASH. The server will remember this and
** subsequent ci-lock requests from different clients will generate
** a ci-lock-fail pragma in the reply.
|
| ︙ | ︙ | |||
1684 1685 1686 1687 1688 1689 1690 |
blob_str(&xfer.aToken[3])
);
db_protect_pop();
}
if( db_get_boolean("forbid-delta-manifests",0) ){
@ pragma avoid-delta-manifests
}
| < > < | < < < < < < < < < < < < < < < < < < < < | < | 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 |
blob_str(&xfer.aToken[3])
);
db_protect_pop();
}
if( db_get_boolean("forbid-delta-manifests",0) ){
@ pragma avoid-delta-manifests
}
}
/* pragma ci-unlock CLIENT-ID
**
** Remove any locks previously held by CLIENT-ID. Clients send this
** pragma with their own ID whenever they know that they no longer
** have any commits pending.
*/
if( blob_eq(&xfer.aToken[1], "ci-unlock")
&& xfer.nToken==3
&& blob_is_hname(&xfer.aToken[2])
){
db_unprotect(PROTECT_CONFIG);
db_multi_exec(
"DELETE FROM config"
" WHERE name GLOB 'ci-lock-*'"
" AND json_extract(value,'$.clientid')=%Q",
blob_str(&xfer.aToken[2])
);
db_protect_pop();
}
}else
/* Unknown message
*/
{
cgi_reset_content();
@ error bad\scommand:\s%F(blob_str(&xfer.line))
|
| ︙ | ︙ | |||
2130 2131 2132 2133 2134 2135 2136 |
}
blob_appendf(&send, "pragma ci-lock %s %s\n", zCkinLock, zClientId);
zCkinLock = 0;
}else if( zClientId ){
blob_appendf(&send, "pragma ci-unlock %s\n", zClientId);
}
| < < < < < < < < < < | 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 |
}
blob_appendf(&send, "pragma ci-lock %s %s\n", zCkinLock, zClientId);
zCkinLock = 0;
}else if( zClientId ){
blob_appendf(&send, "pragma ci-unlock %s\n", zClientId);
}
/* Append randomness to the end of the uplink message. This makes all
** messages unique so that that the login-card nonce will always
** be unique.
*/
zRandomness = db_text(0, "SELECT hex(randomblob(20))");
blob_appendf(&send, "# %s\n", zRandomness);
free(zRandomness);
|
| ︙ | ︙ |