NATION

PASSWORD

[BUG] CloudFlare asks for CAPTCHA test for certain API calls

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

[BUG] CloudFlare asks for CAPTCHA test for certain API calls

Postby The Northern Light » Fri Apr 10, 2020 12:38 am

Hi,

Some of my scripts have been running into the following problem recently (I think it's been the last five days or so):

A page from CloudFlare shows up saying that I (or my script at least) need to complete a CAPTCHA test to access NationStates.

It seems to only happen for certain API calls deterministically, but I haven't been able to discern a pattern. Most of the ones I detected that trigger the page are about getting tokens to update existing dispatches through the private API. (Though note that many other similar dispatch-editing calls make it through to the API successfully, and I am not sure what is special about the ones that fail.)

For example, one that consistently triggers the error is a call for a token to edit this dispatch. The CloudFlare page mentions a "Cloudflare Ray ID: 581abe5b7e58ea6e", in case this is helpful.

Could this be looked into please? Given that the API is by definition intended for scripts, having CloudFlare randomly ask for CAPTCHA tests is rather problematic.

Thanks in advance!
Last edited by The Northern Light on Fri Apr 10, 2020 12:40 am, edited 1 time in total.
Home of the WADP, Planet Eras, and the Constibillocode!
Join The North Pacific!
Where the democracy is strong, the debate robust, and the rum plentiful!

Forum | Discord Chat | Citizenship | Executive Staff | North Pacific Army | World Assembly Ministry | Roleplay | Trading Cards | Handbook

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Fri Apr 10, 2020 1:15 am

I've tweaked the settings--hopefully the API is exempt from these checks now. Please let me know if you run into them again there.

User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

Postby The Northern Light » Fri Apr 10, 2020 11:25 am

Unfortunately, the issue remains. All of the cases I had found that triggered the CAPTCHA test still do so.
Home of the WADP, Planet Eras, and the Constibillocode!
Join The North Pacific!
Where the democracy is strong, the debate robust, and the rum plentiful!

Forum | Discord Chat | Citizenship | Executive Staff | North Pacific Army | World Assembly Ministry | Roleplay | Trading Cards | Handbook

User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

Postby The Northern Light » Sat Apr 11, 2020 7:41 am

As a note, when I tried to manually edit the same dispatch I reported in the OP, I still received the CAPTCHA test.
Home of the WADP, Planet Eras, and the Constibillocode!
Join The North Pacific!
Where the democracy is strong, the debate robust, and the rum plentiful!

Forum | Discord Chat | Citizenship | Executive Staff | North Pacific Army | World Assembly Ministry | Roleplay | Trading Cards | Handbook

User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

Postby The Northern Light » Sat Apr 11, 2020 9:32 pm

[violet], I don't know whether the changes you made in this thread were also meant to help with API requests. However, the CAPTCHA test still shows up for the same API calls I had discovered in the OP.
Home of the WADP, Planet Eras, and the Constibillocode!
Join The North Pacific!
Where the democracy is strong, the debate robust, and the rum plentiful!

Forum | Discord Chat | Citizenship | Executive Staff | North Pacific Army | World Assembly Ministry | Roleplay | Trading Cards | Handbook

User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

Postby The Northern Light » Mon Apr 20, 2020 9:24 pm

Hi,

I am sorry to quadruple-post, but I wanted to bring this thread back to the first page.

This issue remains and, as there is no way for scripts to complete the CAPTCHA test (it is, after all, designed to detect humans vs scripts), it is very disruptive.

Would it please be possible to take another look and try to prevent the CAPTCHA tests from affecting API calls?

Thanks a lot!
Home of the WADP, Planet Eras, and the Constibillocode!
Join The North Pacific!
Where the democracy is strong, the debate robust, and the rum plentiful!

Forum | Discord Chat | Citizenship | Executive Staff | North Pacific Army | World Assembly Ministry | Roleplay | Trading Cards | Handbook

User avatar
Recuecn
Ambassador
 
Posts: 1052
Founded: Feb 02, 2015
New York Times Democracy

Postby Recuecn » Wed Apr 22, 2020 6:18 am

I'd like to second TNL's request here. I use both the market dispatch TNL publishes, as well as Trotterdam's issues result page, just two of the (very useful) api tools some people have created, and I don't know if TNL's card tools specifically are being hurt by the captchas, but I know that Trotterdam's page is. Is it possible for this to be a priority?
rəswɛsən

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Wed Apr 22, 2020 10:17 pm

The Northern Light wrote:[violet], I don't know whether the changes you made in this thread were also meant to help with API requests. However, the CAPTCHA test still shows up for the same API calls I had discovered in the OP.

The API is (supposedly) whitelisted and you should never encounter a CloudFlare check there. If you do, please post / GHR / email an example curl request that triggers it, along with some detail about the error (a screenshot is perfect). The CloudFlare Ray ID isn't relevant but the exact error message is.

User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

Postby The Northern Light » Wed May 06, 2020 2:14 pm

Hi,

Unfortunately, this issue remains. As [violet] requested, I have submitted a detailed GHR, including some code reproducing the error.

Thanks,
TNL.
Home of the WADP, Planet Eras, and the Constibillocode!
Join The North Pacific!
Where the democracy is strong, the debate robust, and the rum plentiful!

Forum | Discord Chat | Citizenship | Executive Staff | North Pacific Army | World Assembly Ministry | Roleplay | Trading Cards | Handbook

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Wed May 06, 2020 6:28 pm

Thanks, that helped me track down a problem with API whitelisting. You should never encounter a CloudFlare check there; let me know if you do.

User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

Postby The Northern Light » Wed May 06, 2020 6:31 pm

I re-run my dispatch updating script and it didn't run into any issues. Thanks a lot [violet]!
Home of the WADP, Planet Eras, and the Constibillocode!
Join The North Pacific!
Where the democracy is strong, the debate robust, and the rum plentiful!

Forum | Discord Chat | Citizenship | Executive Staff | North Pacific Army | World Assembly Ministry | Roleplay | Trading Cards | Handbook

User avatar
Jaydonian
Civilian
 
Posts: 1
Founded: Jan 03, 2019
Inoffensive Centrist Democracy

Postby Jaydonian » Mon Jun 08, 2020 12:40 pm

Even when I do pass the captcha, it always fails my security check. When I try again, the same stupid captcha appears again and the same thing happens. I don't know how to solve it. Can someone help?


Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Alinek, Armbruster, Assassins BrotherHoodd, Automaton Legion 4, Barbartopia, Bormiar, British Arzelentaxmacone, Catastrophic Hardware Failure Notice, Ebrein, Ehrijeters, Fachumonn, Ferret Civilization, Fotisdia, Free Toast, GENHISH, Google [Bot], Great Yue, Heromerland, Hyponichtmallieturam, Imperial German State, Khantin, Larsez, Lower Antegria, Miraregna, Moloto Japan, New Baltic States, New Westmore, North American Imperial State, Omnicontrol, Oronatia, Patolia, Patriums, Poulton-with-Fearnhead, Reyo, Schardonia, Scus was taken, Second Scratch Empire, Sokkalia, Stones, Sumoriant, Suvarnavarta, The High Academy of Aztec, The Koryoan Union, The United Good, Tianjastan, United Calanworie, Xoshen

Advertisement

Remove ads