• Resolved autredr

    (@autredr)


    Hello

    First of all many thanks for this plugin.

    In the function admin_notices, a URL is built to verify whether the CAS server is available. The port number is used to determine the protocol (HTTP / HTTPS). However the port number is not taken into account any more afterwards. Our CAS server is not running on the default HTTPS port and therefore the check failed.
    I fixed this by using the port number in the URL:
    if ( ! $this->url_is_accessible( $protocol . '://' . $auth_settings['cas_host'] . ':' . $auth_settings['cas_port']. $auth_settings['cas_path'] ) ) :

    Because of the above, our CAS server was initially reported as not available but it took a while before that message appeared. I improved this by setting a curl timeout option in the function url_is_accessible:
    curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 5 );
    In addition I also set the cacert in that function:

    $cainfo = dirname( __FILE__ ) . '/inc/cacert.pem';
    curl_setopt( $handle, CURLOPT_CAINFO, $cainfo )

    You might take into account my remarks for a future version.


    Kind Regards
    Dries Van Autreve

    https://ww.wp.xz.cn/plugins/authorizer/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Admin notices’ is closed to new replies.