Language: PHP
Label: safe
CWE: CWE-94 \u2014 Improper Control of Generation of Code ('Code Injection')
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Code:
	public function testCustomerDirOptionsAddMalformed()
	{
		global $admin_userdata;

		// get customer
		$json_result = Customers::getLocal($admin_userdata, array(
			'loginname' => 'test1'
		))->get();
		$customer_userdata = json_decode($json_result, true)['data'];

		$data = [
			'path' => '/testmalformed',
			'error404path' => '/"'.PHP_EOL.'something/../../../../weird 404.html'.PHP_EOL.'#'
		];
		$json_result = DirOptions::getLocal($customer_userdata, $data)->add();
		$result = json_decode($json_result, true)['data'];
		$expected = '/"something/././././weird\ 404.html#';
		$this->assertEquals($expected, $result['error404path']);
	}