write the symbolic constraint signature for the followingvulnerable PHP code. You can express the symbolic constraintsignature using Z3 syntax.
This PHP script has an unrestrictedfile uploading vulnerability.
$_FILES[‘upload_file’][‘name’] returnsa filename in the format of “filename.extension”, where both thefilename and extension are unknown. Therefore,$_FILES[‘upload_file’][‘name’] represents a symbolic value. (10Points)
$path = “./temp”;
$filename =$_FILES[‘upload_file’][‘name’];
$pathAndName = $path . “/” .$filename;
if(strlen($filename) > 5){
move_uploaded_file($_FILES[‘upload_file’][‘name’],$pathAndName);
}
- $_FILES[‘upload_file’][‘name’] returns a filename in the formatof “filename.extension”, where both the filename and extension areunknown. But both of them are non-empty strings.
- move_uploaded_file(src, dst) moves a file from src to dst. Thisfunction is going to create
OROR