Fossil SCM
We can detect when to enable compatibility mode, so do this instead of requiring an explicit argument.
Commit
90c4859315b63033c3b021d39f60e9cc413a3ed8
Parent
12dbaebec2b688c…
2 files changed
+1
-1
-3
+1
-1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -1472,11 +1472,11 @@ | ||
| 1472 | 1472 | } |
| 1473 | 1473 | |
| 1474 | 1474 | /* Got all probes now first transport_open is completed |
| 1475 | 1475 | ** so return the command that was requested |
| 1476 | 1476 | */ |
| 1477 | - /* *zCmd = mprintf("%s", zToken); */ | |
| 1477 | + g.fSshClient |= CGI_SSH_COMPAT; | |
| 1478 | 1478 | return mprintf("%s", zToken); |
| 1479 | 1479 | } |
| 1480 | 1480 | |
| 1481 | 1481 | /* |
| 1482 | 1482 | ** This routine handles the old fossil SSH transport_flip |
| 1483 | 1483 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1472,11 +1472,11 @@ | |
| 1472 | } |
| 1473 | |
| 1474 | /* Got all probes now first transport_open is completed |
| 1475 | ** so return the command that was requested |
| 1476 | */ |
| 1477 | /* *zCmd = mprintf("%s", zToken); */ |
| 1478 | return mprintf("%s", zToken); |
| 1479 | } |
| 1480 | |
| 1481 | /* |
| 1482 | ** This routine handles the old fossil SSH transport_flip |
| 1483 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1472,11 +1472,11 @@ | |
| 1472 | } |
| 1473 | |
| 1474 | /* Got all probes now first transport_open is completed |
| 1475 | ** so return the command that was requested |
| 1476 | */ |
| 1477 | g.fSshClient |= CGI_SSH_COMPAT; |
| 1478 | return mprintf("%s", zToken); |
| 1479 | } |
| 1480 | |
| 1481 | /* |
| 1482 | ** This routine handles the old fossil SSH transport_flip |
| 1483 |
-3
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1726,17 +1726,14 @@ | ||
| 1726 | 1726 | ** Note that the following command is used by ssh:// processing. |
| 1727 | 1727 | ** |
| 1728 | 1728 | ** COMMAND: test-http |
| 1729 | 1729 | ** Works like the http command but gives setup permission to all users. |
| 1730 | 1730 | ** |
| 1731 | -** Options: | |
| 1732 | -** --ssh-compat Compatibility option for SSH keys and old clients | |
| 1733 | 1731 | */ |
| 1734 | 1732 | void cmd_test_http(void){ |
| 1735 | 1733 | const char *zIpAddr; /* IP address of remote client */ |
| 1736 | 1734 | |
| 1737 | - if( find_option("ssh-compat", 0, 0)!=0 ) g.fSshClient |= CGI_SSH_COMPAT; | |
| 1738 | 1735 | Th_InitTraceLog(); |
| 1739 | 1736 | login_set_capabilities("sx", 0); |
| 1740 | 1737 | g.useLocalauth = 1; |
| 1741 | 1738 | g.httpIn = stdin; |
| 1742 | 1739 | g.httpOut = stdout; |
| 1743 | 1740 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1726,17 +1726,14 @@ | |
| 1726 | ** Note that the following command is used by ssh:// processing. |
| 1727 | ** |
| 1728 | ** COMMAND: test-http |
| 1729 | ** Works like the http command but gives setup permission to all users. |
| 1730 | ** |
| 1731 | ** Options: |
| 1732 | ** --ssh-compat Compatibility option for SSH keys and old clients |
| 1733 | */ |
| 1734 | void cmd_test_http(void){ |
| 1735 | const char *zIpAddr; /* IP address of remote client */ |
| 1736 | |
| 1737 | if( find_option("ssh-compat", 0, 0)!=0 ) g.fSshClient |= CGI_SSH_COMPAT; |
| 1738 | Th_InitTraceLog(); |
| 1739 | login_set_capabilities("sx", 0); |
| 1740 | g.useLocalauth = 1; |
| 1741 | g.httpIn = stdin; |
| 1742 | g.httpOut = stdout; |
| 1743 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1726,17 +1726,14 @@ | |
| 1726 | ** Note that the following command is used by ssh:// processing. |
| 1727 | ** |
| 1728 | ** COMMAND: test-http |
| 1729 | ** Works like the http command but gives setup permission to all users. |
| 1730 | ** |
| 1731 | */ |
| 1732 | void cmd_test_http(void){ |
| 1733 | const char *zIpAddr; /* IP address of remote client */ |
| 1734 | |
| 1735 | Th_InitTraceLog(); |
| 1736 | login_set_capabilities("sx", 0); |
| 1737 | g.useLocalauth = 1; |
| 1738 | g.httpIn = stdin; |
| 1739 | g.httpOut = stdout; |
| 1740 |