mattv8 / yourls-ldap-plugin

Simple LDAP plugin for YOURLS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cURL error 6 after LDAP plugin activation

Adriviere opened this issue · comments

Hi,

I'm trying to use the ldap plugin but after its activation, I can't use LDAP authentication.
So I enabled YOURLS_DEBUG (in /user/config.php) and i saw this on the login page :

Connected to database yourls on localhost
SQL: SELECT option_name, option_value FROM yourls_options WHERE 1=1 (0.00059 s)
cURL error 6: Could not resolve host: api.yourls.org (POST on https://api.yourls.org/core/version/1.0/)
SQL: UPDATE yourls_options SET option_value = 'O:8:"stdClass":4:{s:15:"failed_attempts";i:104;s:12:"last_attempt";i:1596462082;s:11:"last_result";s:0:"";s:15:"version_checked";s:6:"1.7.10";}' WHERE option_name = 'core_version_checks' (0.00545 s)
Check for new version: no

First, I would like to solve the cURL error 6. I think I should add api.yourls.org in /etc/hosts but I can't find the IP address of this site.
I use a proxy but it's correctly registered in my system.
Can someone help me please? :)

commented
$ host api.yourls.org
api.yourls.org has address 69.163.216.239

You can add nameserver 1.1.1.1 (cloudflare) or nameserver 8.8.8.8 (google) to your /etc/resolv.conf to make it resolve.

Thank you!
But now there is this error:

cURL error 7: Failed to connect to api.yourls.org port 443: No route to host (POST on https://api.yourls.org/core/version/1.0/)

I tried to do : curl --ipv4 -v https://api.yourls.org and I have this error:

  • SSL certificate problem: unable to get local issuer certificate
  • stopped the pause stream!
  • Closing connection 0
    curl: (60) SSL certificate problem: unable to get local issuer certificate
    More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

So I downloaded the certificate via https://curl.haxx.se/ca/cacert.pem and put it in /etc/php/7.2/fpm/php.ini (with the command curl.cainfo="/path/to/downloaded/cacert.pem") but the error is still here.

Any suggestion is welcomed.

commented

It looks like your internet connection is not configured properly. There are no routes to the internet. Are you behind some kind of captive wifi portal? You can add -k argument to the cURL to skip certificate validation temporarily. Also -v verbose or -L may be useful to follow redirects (if the response contains a HTTP redirect)

With the argument -k I can see that this website is blocked by my company's security policy. I'll talk to my manager to know what can I do.

Thanks you very much!