Fossil SCM
Escape "~" in blob_append_escaped_arg() on Unix. An argument that began with "~" went to the shell unquoted and was replaced by a home directory, so that the path in ssh://host/~/repo.fossil was expanded on the local machine and not on the server. A setting whose value begins with a literal "~" is no longer expanded when it is passed as an argument.
Commit
78d801eceb21fcb21508fd4c869356fde40eb166d3ccf9ecc30d03bbd07c4d06
Parent
dda3a7874c8b262…
1 file changed
+2
-2
+2
-2
| --- src/blob.c | ||
| +++ src/blob.c | ||
| @@ -1690,21 +1690,21 @@ | ||
| 1690 | 1690 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6x */ |
| 1691 | 1691 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, /* 7x */ |
| 1692 | 1692 | #else |
| 1693 | 1693 | /* Unix |
| 1694 | 1694 | ** Prohibit: all control characters, including tab, \r and \n |
| 1695 | -** Escape: (space) ! " # $ % & ' ( ) * ; < > ? [ \ ] ^ ` { | } | |
| 1695 | +** Escape: (space) ! " # $ % & ' ( ) * ; < > ? [ \ ] ^ ` { | } ~ | |
| 1696 | 1696 | */ |
| 1697 | 1697 | /* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf */ |
| 1698 | 1698 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x */ |
| 1699 | 1699 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 1x */ |
| 1700 | 1700 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 2x */ |
| 1701 | 1701 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, /* 3x */ |
| 1702 | 1702 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4x */ |
| 1703 | 1703 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, /* 5x */ |
| 1704 | 1704 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6x */ |
| 1705 | - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, /* 7x */ | |
| 1705 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, /* 7x */ | |
| 1706 | 1706 | #endif |
| 1707 | 1707 | /* all bytes 0x80 through 0xbf are unescaped, being secondary |
| 1708 | 1708 | ** bytes to UTF8 characters. Bytes 0xc0 through 0xff are the |
| 1709 | 1709 | ** first byte of a UTF8 character and do get escaped */ |
| 1710 | 1710 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 8x */ |
| 1711 | 1711 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -1690,21 +1690,21 @@ | |
| 1690 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6x */ |
| 1691 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, /* 7x */ |
| 1692 | #else |
| 1693 | /* Unix |
| 1694 | ** Prohibit: all control characters, including tab, \r and \n |
| 1695 | ** Escape: (space) ! " # $ % & ' ( ) * ; < > ? [ \ ] ^ ` { | } |
| 1696 | */ |
| 1697 | /* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf */ |
| 1698 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x */ |
| 1699 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 1x */ |
| 1700 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 2x */ |
| 1701 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, /* 3x */ |
| 1702 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4x */ |
| 1703 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, /* 5x */ |
| 1704 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6x */ |
| 1705 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, /* 7x */ |
| 1706 | #endif |
| 1707 | /* all bytes 0x80 through 0xbf are unescaped, being secondary |
| 1708 | ** bytes to UTF8 characters. Bytes 0xc0 through 0xff are the |
| 1709 | ** first byte of a UTF8 character and do get escaped */ |
| 1710 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 8x */ |
| 1711 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -1690,21 +1690,21 @@ | |
| 1690 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6x */ |
| 1691 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, /* 7x */ |
| 1692 | #else |
| 1693 | /* Unix |
| 1694 | ** Prohibit: all control characters, including tab, \r and \n |
| 1695 | ** Escape: (space) ! " # $ % & ' ( ) * ; < > ? [ \ ] ^ ` { | } ~ |
| 1696 | */ |
| 1697 | /* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf */ |
| 1698 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x */ |
| 1699 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 1x */ |
| 1700 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 2x */ |
| 1701 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, /* 3x */ |
| 1702 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4x */ |
| 1703 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, /* 5x */ |
| 1704 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6x */ |
| 1705 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, /* 7x */ |
| 1706 | #endif |
| 1707 | /* all bytes 0x80 through 0xbf are unescaped, being secondary |
| 1708 | ** bytes to UTF8 characters. Bytes 0xc0 through 0xff are the |
| 1709 | ** first byte of a UTF8 character and do get escaped */ |
| 1710 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 8x */ |
| 1711 |