Vulny-Code-Static-Analysis/vulns/curl-ssl-verifypeer-off.php

13 lines
287 B
PHP
Raw Normal View History

2022-04-30 13:00:48 +00:00
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
// ruleid: curl-ssl-verifypeer-off
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// ok: curl-ssl-verifypeer-off
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);