observerss / pygodaddy

3rd Party Client Library for Manipulating Go Daddy DNS Records.
https://pygodaddy.readthedocs.org/
Other
37 stars 30 forks source link

Error in method _save_records() #2

Closed xMAC94x closed 9 years ago

xMAC94x commented 9 years ago

Hello Jingchao Hu, I hope you read this bug issue :) I am using your pygodaddy Libary for 1 Year and it worked perfectly fine till last week.

I've done some research and it looks like godaddy rejects the HTTP POST in the _save_records() method.

 "<?xml version="1.0" encoding="utf-8"?><string xmlns="http://tempuri.org/">FAILURE|Invalid Request.</string>"

It looks like the Protocol has changed. I used the following code for the last 2 methods:

 result_up1 = client._add_record(prefix="foo", value="112.123.123.123", index=3, record_type="A")
 result_up2 = client._save_records(domain="example.com", index=3, record_type="A")

result_up1 was true, and result_up2 was false.

I Googled ad bit and found this: "Godaddy CSRF protection". They fixed the Error. Maybe this is causing a Problem here? But i am not really sure, i am just guessing.

Thanks for this great Libary !

DanChianucci commented 9 years ago

My forked branch contains a fix for this issue. you were correct in that it was the csrf fix that caused this

xMAC94x commented 9 years ago

fixed with Pull request #3