mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-24 10:31:57 +02:00
Merge PR #993 branch 'bantu/ticket/8713' into develop
* bantu/ticket/8713: [ticket/8713] Update untrimmed_variable() doc block. [ticket/8713] Revert changes to ucp_profile, ucp_register and acp_users. [ticket/8713] Trim password in auth_db to keep compatibility. [ticket/8713] Call htmlspecialchars_decode() on transfer (e.g. ftp) passwords. [ticket/8713] Rename untrimed_variable() to untrimmed_variable(). [ticket/8713] DRY: variable() and untrimed_variable() into a protected method. [ticket/8713] Fix type_cast_helper.php doc blocks: Add punctuation etc. [ticket/8713] Always trim array keys. [ticket/8713] Add simple (non-nested) test case for untrimmed set_var(). [ticket/8713] Use \t in double quotes instead of tabs. [ticket/8713] Use correct parameter for nested data. [ticket/8713] Adjust test method name to other recursive_set_var() tests. [ticket/8713] Do not trim login inputs
This commit is contained in:
@@ -48,4 +48,24 @@ class phpbb_type_cast_helper_test extends phpbb_test_case
|
||||
|
||||
$this->assertEquals($expected, $data);
|
||||
}
|
||||
|
||||
public function test_simple_untrimmed_recursive_set_var()
|
||||
{
|
||||
$data = " eviL<3\t\t";
|
||||
$expected = " eviL<3\t\t";
|
||||
|
||||
$this->type_cast_helper->recursive_set_var($data, '', true, false);
|
||||
|
||||
$this->assertEquals($expected, $data);
|
||||
}
|
||||
|
||||
public function test_nested_untrimmed_recursive_set_var()
|
||||
{
|
||||
$data = array(" eviL<3\t\t");
|
||||
$expected = array(" eviL<3\t\t");
|
||||
|
||||
$this->type_cast_helper->recursive_set_var($data, array(0 => ''), true, false);
|
||||
|
||||
$this->assertEquals($expected, $data);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user