composer-wp-pro-plugins icon indicating copy to clipboard operation
composer-wp-pro-plugins copied to clipboard

Ninja Forms download fails

Open mcaskill opened this issue 1 year ago • 4 comments

This ticket is mainly for informational purposes.

For the past two weeks, this Composer plugin has been unable to fetch the download URL for Ninja Forms add-ons.

If I change the internal API request from GET to POST, it works.

On May 24th, I contacted support about the issue. They replied that they would look into it.

On June 9th, I figured out why GET requests are not working:

Ninja Forms introduced a cookie consent banner that stores a nf_cc cookie.

If this cookie is not defined when making the API request, their server returns the HTML home page.

If this cookie is defined when making the API request, their server returns the expected JSON response.

curl -X GET -I -H 'Cookie: nf_cc=' 'https://ninjaforms.com/?edd_action=get_version&license=XXXXXX&item_name=File+Uploads&url=ZZZZZ&version=3.3.15'

I've updated support about the issue. Awaiting their response.

mcaskill avatar Jun 09 '23 18:06 mcaskill

Should we integrate a fallback request using POST if GET fails?

mcaskill avatar Jun 13 '23 18:06 mcaskill

@mcaskill Should we just make it POST for Ninja forms?

junaidbhura avatar Jun 13 '23 21:06 junaidbhura

We could. Maybe we should switch all EDD plugins to POST in case any others deploy some kind of plugin or software that hijacks the GET request 🤷‍♂️.

In my fork of this Composer plugin, I've switched only Ninja Forms to POST for the time being.

Given no one else has noticed / encountered / raised the issue, we could do nothing about it for now.

mcaskill avatar Jun 13 '23 22:06 mcaskill

Sounds good, lets wait for customer support to get back to take a call on what to do.

junaidbhura avatar Jun 13 '23 22:06 junaidbhura