Language: PHP
Label: safe
CWE: CWE-59 \u2014 Improper Link Resolution Before File Access ('Link Following')
The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.

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

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

		$customer_userdata['ftps_used'] = 100;

		$this->expectExceptionCode(406);
		$this->expectExceptionMessage('No more resources available');
		Ftps::getLocal($customer_userdata)->add();
	}