Check-in [90c4859315]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:We can detect when to enable compatibility mode, so do this instead of requiring an explicit argument.
Timelines: family | ancestors | ssh-test-http
Files: files | file ages | folders
SHA1: 90c4859315b63033c3b021d39f60e9cc413a3ed8
User & Date: andybradford 2013-08-19 14:48:21.586
Context
2013-08-19
14:48
We can detect when to enable compatibility mode, so do this instead of requiring an explicit argument. Leaf check-in: 90c4859315 user: andybradford tags: ssh-test-http
2013-08-18
01:26
Use a little more precaution that the Fossil command has been seen first. check-in: 12dbaebec2 user: andybradford tags: ssh-test-http
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/cgi.c.
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
      malformed_request("malformed probe");
    }
  }

  /* Got all probes now first transport_open is completed
  ** so return the command that was requested
  */
  /* *zCmd = mprintf("%s", zToken); */
  return mprintf("%s", zToken);
}

/*
** This routine handles the old fossil SSH transport_flip
** and transport_open communications if detected.
*/







|







1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
      malformed_request("malformed probe");
    }
  }

  /* Got all probes now first transport_open is completed
  ** so return the command that was requested
  */
  g.fSshClient |= CGI_SSH_COMPAT;
  return mprintf("%s", zToken);
}

/*
** This routine handles the old fossil SSH transport_flip
** and transport_open communications if detected.
*/
Changes to src/main.c.
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744

/*
** Note that the following command is used by ssh:// processing.
**
** COMMAND: test-http
** Works like the http command but gives setup permission to all users.
**
** Options:
**   --ssh-compat        Compatibility option for SSH keys and old clients
*/
void cmd_test_http(void){
  const char *zIpAddr;    /* IP address of remote client */

  if( find_option("ssh-compat", 0, 0)!=0 ) g.fSshClient |= CGI_SSH_COMPAT;
  Th_InitTraceLog();
  login_set_capabilities("sx", 0);
  g.useLocalauth = 1;
  g.httpIn = stdin;
  g.httpOut = stdout;
  find_server_repository(0);
  g.cgiOutput = 1;







<
<




<







1724
1725
1726
1727
1728
1729
1730


1731
1732
1733
1734

1735
1736
1737
1738
1739
1740
1741

/*
** Note that the following command is used by ssh:// processing.
**
** COMMAND: test-http
** Works like the http command but gives setup permission to all users.
**


*/
void cmd_test_http(void){
  const char *zIpAddr;    /* IP address of remote client */


  Th_InitTraceLog();
  login_set_capabilities("sx", 0);
  g.useLocalauth = 1;
  g.httpIn = stdin;
  g.httpOut = stdout;
  find_server_repository(0);
  g.cgiOutput = 1;