Commit 55915501 authored by Dan Fandrich's avatar Dan Fandrich
Browse files

Fixed a couple more locale-dependent toupper conversions, mainly for

clarity.  This does fix one problem that causes ;type=i FTP URLs
to fail in the Turkish locale when CURLOPT_PROXY_TRANSFER_MODE is
used (test case 561)

Added tests 561 and 1092 through 1094 to test various combinations
of ;type= and ;mode= URLs that could potentially fail in the Turkish
locale.
parent 6bb9ef8d
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -6,6 +6,19 @@


                                  Changelog
                                  Changelog


Daniel Fandrich (20 Jan 2009)
- Call setlocale() for libtest tests to test the effects of locale-induced
  libc changes on libcurl.

- Fixed a couple more locale-dependent toupper conversions, mainly for
  clarity.  This does fix one problem that causes ;type=i FTP URLs
  to fail in the Turkish locale when CURLOPT_PROXY_TRANSFER_MODE is
  used (test case 561)

- Added tests 561 and 1091 through 1094 to test various combinations
  of ;type= and ;mode= URLs that could potentially fail in the Turkish
  locale.

Daniel Stenberg (20 Jan 2009)
Daniel Stenberg (20 Jan 2009)
- Lisa Xu pointed out that the ssh.obj file was missing from the lib/Makefile.vc6
- Lisa Xu pointed out that the ssh.obj file was missing from the lib/Makefile.vc6
  file (and thus from the vc8 and vc9 ones too). 
  file (and thus from the vc8 and vc9 ones too). 
+1 −0
Original line number Original line Diff line number Diff line
@@ -14,6 +14,7 @@ This release includes the following changes:
This release includes the following bugfixes:
This release includes the following bugfixes:


 o missing ssh.obj in VS makefiles
 o missing ssh.obj in VS makefiles
 o FTP ;type=i URLs now work with CURLOPT_PROXY_TRANSFER_MODE in Turkish locale


This release includes the following known bugs:
This release includes the following known bugs:


+2 −1
Original line number Original line Diff line number Diff line
@@ -89,6 +89,7 @@
#include "sockaddr.h" /* required for Curl_sockaddr_storage */
#include "sockaddr.h" /* required for Curl_sockaddr_storage */
#include "multiif.h"
#include "multiif.h"
#include "url.h"
#include "url.h"
#include "rawstr.h"


#define _MPRINTF_REPLACE /* use our functions only */
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
#include <curl/mprintf.h>
@@ -4141,7 +4142,7 @@ static CURLcode ftp_setup_connection(struct connectdata * conn)


  if(type) {
  if(type) {
    *type = 0;                     /* it was in the middle of the hostname */
    *type = 0;                     /* it was in the middle of the hostname */
    command = (char) toupper((int) type[6]);
    command = Curl_raw_toupper(type[6]);


    switch (command) {
    switch (command) {
    case 'A': /* ASCII mode */
    case 'A': /* ASCII mode */
+1 −1
Original line number Original line Diff line number Diff line
@@ -2271,7 +2271,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
      if(checkprefix("ftp://", ppath) || checkprefix("ftps://", ppath)) {
      if(checkprefix("ftp://", ppath) || checkprefix("ftps://", ppath)) {
        char *p = strstr(ppath, ";type=");
        char *p = strstr(ppath, ";type=");
        if(p && p[6] && p[7] == 0) {
        if(p && p[6] && p[7] == 0) {
          switch (toupper((int)((unsigned char)p[6]))) {
          switch (Curl_raw_toupper(p[6])) {
          case 'A':
          case 'A':
          case 'D':
          case 'D':
          case 'I':
          case 'I':
+7 −14
Original line number Original line Diff line number Diff line
@@ -323,7 +323,7 @@ CURLntlm Curl_input_ntlm(struct connectdata *conn,
 * Turns a 56 bit key into the 64 bit, odd parity key and sets the key.  The
 * Turns a 56 bit key into the 64 bit, odd parity key and sets the key.  The
 * key schedule ks is also set.
 * key schedule ks is also set.
 */
 */
static void setup_des_key(unsigned char *key_56,
static void setup_des_key(const unsigned char *key_56,
                          DES_key_schedule DESKEYARG(ks))
                          DES_key_schedule DESKEYARG(ks))
{
{
  DES_cblock key;
  DES_cblock key;
@@ -346,8 +346,8 @@ static void setup_des_key(unsigned char *key_56,
  * 8 byte plaintext is encrypted with each key and the resulting 24
  * 8 byte plaintext is encrypted with each key and the resulting 24
  * bytes are stored in the results array.
  * bytes are stored in the results array.
  */
  */
static void lm_resp(unsigned char *keys,
static void lm_resp(const unsigned char *keys,
                      unsigned char *plaintext,
                    const unsigned char *plaintext,
                    unsigned char *results)
                    unsigned char *results)
{
{
  DES_key_schedule ks;
  DES_key_schedule ks;
@@ -377,17 +377,10 @@ static void mk_lm_hash(struct SessionHandle *data,
  static const unsigned char magic[] = {
  static const unsigned char magic[] = {
    0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */
    0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */
  };
  };
  unsigned int i;
  size_t len = CURLMIN(strlen(password), 14);
  size_t len = strlen(password);

  if(len > 14)
    len = 14;

  for (i=0; i<len; i++)
    pw[i] = (unsigned char)toupper(password[i]);


  for (; i<14; i++)
  Curl_strntoupper((char *)pw, password, len);
    pw[i] = 0;
  memset(&pw[len], 0, 14-len);


#ifdef CURL_DOES_CONVERSIONS
#ifdef CURL_DOES_CONVERSIONS
  /*
  /*
Loading