Projet

Général

Profil

Révision b4adf10d

Ajouté par Assos Assos il y a plus de 9 ans

Udpate to 7.33

Voir les différences:

drupal7/modules/simpletest/tests/database_test.test
1947 1947

  
1948 1948
    $this->assertEqual($num_records, 4, 'Returned the correct number of rows.');
1949 1949
  }
1950

  
1951
  /**
1952
   * Tests that the sort direction is sanitized properly.
1953
   */
1954
  function testOrderByEscaping() {
1955
    $query = db_select('test')->orderBy('name', 'invalid direction');
1956
    $order_bys = $query->getOrderBy();
1957
    $this->assertEqual($order_bys['name'], 'ASC', 'Invalid order by direction is converted to ASC.');
1958
  }
1950 1959
}
1951 1960

  
1952 1961
/**
......
3391 3400
  public function testArrayArgumentsSQLInjection() {
3392 3401
    // Attempt SQL injection and verify that it does not work.
3393 3402
    $condition = array(
3394
      "1 ;INSERT INTO {test} SET name = 'test12345678'; -- " => '',
3403
      "1 ;INSERT INTO {test} (name) VALUES ('test12345678'); -- " => '',
3395 3404
      '1' => '',
3396 3405
    );
3397 3406
    try {

Formats disponibles : Unified diff