Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    I ran across the same problem (just have “<” char in password) and I believe this is an issue with WooCommerce rather than the plugin, but it can be fixed (or workarounded) from the plugin – try to add the following methods to WC_Gateway_MPAY24 class (in gateway-mpay24.php):

    private function validate_mpay24_password_field($key) {
    	$field = $this->get_field_key( $key );
    	return trim( stripslashes( $_POST[ $field ] ) );
    }
    
    public function validate_apipassprod_field($key) {
    	return $this->validate_mpay24_password_field($key);
    }
    
    public function validate_apipasstest_field($key) {
    	return $this->validate_mpay24_password_field($key);
    }
    

    Note that, with this snippet, there’s basically zero input sanitization done over both password fields, but if you can trust your users (with access to WooCommerce settings), then you’re fine.

    Cheers,
    ?eslav

    Plugin Author datenwerk

    (@datenwerk)

    Fixed in WooCommerce version 2.6.3

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Username and / or password with ampersand breaks plugin’ is closed to new replies.