Browse code

use POST for password checker

Bernd Wurst authored on 28/03/2019 14:29:28
Showing 1 changed files
... ...
@@ -24,13 +24,16 @@ function strong_password($password, $user = array())
24 24
     $result = null;
25 25
     if ($pwcheck) {
26 26
         DEBUG($pwcheck);
27
-        $req = curl_init($pwcheck.$password);
27
+        $req = curl_init($pwcheck);
28 28
         curl_setopt($req, CURLOPT_RETURNTRANSFER, 1);
29 29
         curl_setopt($req, CURLOPT_SSL_VERIFYPEER, 1);
30 30
         curl_setopt($req, CURLOPT_SSL_VERIFYSTATUS, 1);
31 31
         curl_setopt($req, CURLOPT_CONNECTTIMEOUT, 5);
32 32
         curl_setopt($req, CURLOPT_TIMEOUT, 5);
33 33
         curl_setopt($req, CURLOPT_FOLLOWLOCATION, 0);
34
+        curl_setopt($req, CURLOPT_POST, 1);
35
+        curl_setopt($req, CURLOPT_SAFE_UPLOAD, 1);
36
+        curl_setopt($req, CURLOPT_POSTFIELDS, array("password" => $password));
34 37
         $result = chop(curl_exec($req));
35 38
         DEBUG($result);
36 39
     }