You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Ghostwriter marks a Namecheap Update as successful even if it throws an error due to GWs IP not being whitelisted for the Namecheap API key.
To Reproduce
Steps to reproduce the behavior:
Configure a Namcheap API-Key
Don not whitelist your Ghostwriter instance's IP address for that API key.
Configure GW to use the API-Key configured in 1.
Trigger Domain Update.
See no error
Check task status (successful tasks) in Admin-Panel:
Find following error:
{'errors': {'namecheap': 'Namecheap API returned error #1011150: Invalid request IP: XX.XX.XX.XX (see https://www.namecheap.com/support/api/error-codes/)'}, 'updates': {}}
Expected Behavior
The update task should fail.
Server Specs:
OS: Ubuntu 22.04.3 LTS
Docker Docker version 20.10.21, build baeda1f
Ghostwriter: v4.0.1, released 27 September 2023 ( I know, I know. Waiting for 4.1)
The text was updated successfully, but these errors were encountered:
@er4z0r I see this error if the IP address is not whitelisted and I test the API configuration:
I think step 4 in your post references the "Pull Domains from Namecheap" update task on the control panel page. That does trigger "successfully" and record as successful with Django Q, but the result shows the error about the IP.
The task being "successful" in the admin panel is technically correct. Django Q only considers a task as failed if an error raised during the task. The Namecheap update task tracks the error response and logs it, but the task finished successfully (i.e., there were no runtime errors).
The problem is you, the user requesting the update, don't see that error. The issue was actually in the webpage template. There was a bad conditional check that meant the error wasn't displayed. I fixed it so you will now see this:
Describe the bug
Ghostwriter marks a Namecheap Update as successful even if it throws an error due to GWs IP not being whitelisted for the Namecheap API key.
To Reproduce
Steps to reproduce the behavior:
{'errors': {'namecheap': 'Namecheap API returned error #1011150: Invalid request IP: XX.XX.XX.XX (see https://www.namecheap.com/support/api/error-codes/)'}, 'updates': {}}
Expected Behavior
The update task should fail.
Server Specs:
The text was updated successfully, but these errors were encountered: