Forum Replies Created

Viewing 15 replies - 106 through 120 (of 172 total)
  • Thread Starter tezalsec

    (@tezalsec)

    Ok, admitting, using this function did not work either.. The error did go away, but the form would still not submit.

    As the other plugin does come through with my v3 recaptcha, I checked out how the advanced-nocaptcha-recaptcha plugin does this url request, and it uses this, in its anr-captcha-class.php file:

    $url = apply_filters( 'anr_google_verify_url', sprintf( 'https://www.%s/recaptcha/api/siteverify', anr_recaptcha_domain() ) );
    
    			// make a POST request to the Google reCAPTCHA Server
    			$request = wp_remote_post(
    				$url, array(
    					'timeout' => 10,
    					'body'    => array(
    						'secret'   => $secre_key,
    						'response' => $response,
    						'remoteip' => $remoteip,
    					),
    				)
    			);

    Maybe this is the more wp way of doing things (using the wp_remote_post function)? I don’t know, I have no expertise on this, but maybe something to also consider using.

    Anyhow, I do believe it is universally accepted in php land it’s better to not use file_get_contents as it is slow and unsafe.

    • This reply was modified 4 years ago by tezalsec.
    • This reply was modified 4 years ago by tezalsec.
    Thread Starter tezalsec

    (@tezalsec)

    Hi @specialk , thanks. So I have been debugging and this was the causing error:

    [03-Mar-2021 09:26:33 UTC] PHP Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
    error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in …/wp-content/plugins/contact-form-x/inc/core-validate.php on line 113

    The issue is also described here:
    https://stackoverflow.com/questions/14078182/openssl-file-get-contents-failed-to-enable-crypto#14078318

    Now, you could say, it is up to the user to change some server config relating to ssl, which varies for many users, but I remember stumbling years ago on this issue, and since then replacing the use of the file_get_content function with a curl alternative, like below. I remember this method being faster, safer and more future proof. Maybe you would consider this approach in your code?

    function file_get_contents_curl($url) {
    	
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
    	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_URL, $url);
    	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
    	curl_exec($ch);
    	$return_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    
    	// 200 is found, 400 is not found
    	if ($return_code == 200) {
        	$data = curl_exec($ch);	
    	} else {
    		$data = '';
    	}
    	curl_close($ch);
        return $data;
    }
    Thread Starter tezalsec

    (@tezalsec)

    And I overlooked the option “Extra Email Info”, so never mind the point about form data in emails ??

    Thread Starter tezalsec

    (@tezalsec)

    Well, I was wrong. It was not conflicting with the other recaptcha plugin. The issue stayed when I deactivated it.

    I keep getting the “error: invalid recaptcha response”. I have no idea what I am doing wrong. I have tried several different names and email adresses, originating from different IP adresses. Is the recaptcha being too strict?

    Using v3, I see no console errors. Any suggestions?

    • This reply was modified 4 years ago by tezalsec.
    tezalsec

    (@tezalsec)

    Same issue here. Disabling caching does not solve it. The email is sent, but something is lagging and no response message appears.

    Console error info on page load, and repeated when submitting:
    message: “The response is not a valid JSON response.”
    Failed to load resource: the server responded with a status of 404 ()
    /contact/contact-form-7/v1/contact-forms/5/refill?_locale=user:1

    I have not changed anything in my json disabling settings, and let through all cf7 json endpoints. This worked fine in the previous cf7 version.
    Is there not a way to just optionally disable refill and feedback functions, they give more problems to me than they solve.

    @solveweb , please remove [Solved] from the title ??
    @ericharris19 , just exclude ‘contact’ pages in your cache plugin exclusion list.

    Gonna rollback now. Thanks.

    Thread Starter tezalsec

    (@tezalsec)

    Hi,

    I don’t exactly read that on your page: https://wooexperts.com/plugins/wc-cancel-order-pro/

    Can you confirm, that the shortcode creates a cancel button/link in the email, that directly cancels the guest’s order status? WITHOUT having to log in first?

    And if yes, please tell me how the url link in the email is built up to do that, is it secure and not easily guessable?

    Thanks.

    Thread Starter tezalsec

    (@tezalsec)

    Hi,

    I checked the status report and don’t really want to paste everything in it here.

    I did see the override section, and that said this:

    astra-child/woocommerce/emails/customer-completed-order.php,
    astra-child/woocommerce/emails/customer-invoice.php,
    astra-child/woocommerce/emails/email-addresses.php,
    astra-child/woocommerce/emails/email-customer-details.php,
    astra-child/woocommerce/emails/email-footer.php,
    astra-child/woocommerce/emails/email-header.php,
    astra-child/woocommerce/emails/email-order-details.php,
    astra-child/woocommerce/emails/email-order-items.php,
    astra-child/woocommerce/emails/email-styles.php

    So indeed email-customer-details.php is here too.

    Thread Starter tezalsec

    (@tezalsec)

    Thanks, it is working.

    Maybe correct the $prefix variable in your code for others reading this thread.

    Cheers.

    • This reply was modified 4 years ago by tezalsec.
    Thread Starter tezalsec

    (@tezalsec)

    Thread Starter tezalsec

    (@tezalsec)

    Hey @dpeyou , thanks for the update, but I think I got that covered by my existing check on count($order_ids) which I borrowed from your docs:

    
        if ($template_type == 'invoice' && count($order_ids) == 1 ) {    
    	
            // is order total zero/free?
            $document = wcpdf_get_document( $template_type, $order_ids );
    	$order_total = $document->order->get_total();
    	if ($order_total == 0 || $order_total == 0.00) {
    		$free = '-free';
    	} else {
    		$free = '';
    	}
        etc...
    
    Thread Starter tezalsec

    (@tezalsec)

    Hi @dpeyou ,

    cool, it’s working, thanks a lot! ??

    tezalsec

    (@tezalsec)

    @mte90 , thanks for explaining. you might want to read the latest comments in below link. i am pulling back on this issue now ??

    https://www.ads-software.com/support/topic/fatal-error-cannot-redeclare-dnh-function/#post-14058809

    Thread Starter tezalsec

    (@tezalsec)

    Hi @nico23 ,

    thanks for addressing it. And you are right, of course, by wrapping the whole function it should be solved. ??

    FYI, I have never once used your plugin, I was about to try it, but never got beyond the fatal error. And I don’t like creating accounts on sites even before having tried the product even once.

    I never meant any disrespect, I just meant to be helpful and keep the issue alive, as the subject didn’t seem to get any further because everyone was just pointing at each others plugins, and talking about updating libraries. And you are right of course, the fault is primary with the library maker.

    Hope we are moving in the right direction with the library now. Cheers.

    tezalsec

    (@tezalsec)

    @mte90 , to conclude, I checked the code in helper-functions.php of two other plugins, and my assumption is that they are all still at fault. It isnt about libraries being uptodate.

    The DNH function should be either in a class or have a unique function name, like “glossary_DNH”. The check for double occurrence of functions happens by php itself before processing logic, so an if then statement at the start of the include file checking for the loaded state of the function does not sufficiently solve this.

    Please consider renaming the DNH function to a unique variant.

    Thread Starter tezalsec

    (@tezalsec)

    @nico23 , I checked both your code in helper-functions.php, and my assumption is that you are both still at fault. It has nothing to do with libraries being uptodate.

    The DNH function should be either in a class or have a unique function name, like “ARVE_DNH”. The check for double occurrence of functions happens by php itself before processing logic, so an if then statement at the start of the include file does not sufficiently solve this.

    Please consider renaming the DNH function to a unique variant.

    • This reply was modified 4 years ago by tezalsec.
Viewing 15 replies - 106 through 120 (of 172 total)