* Re: [PATCH] Fixes freedns.afraid.org ddns provider
[not found] <CAHoP+V8qk=kZoB2MJ1nv1yKiz4oxfuDRFKx4Nvs=QGza07K7SQ@mail.gmail.com>
@ 2021-01-25 18:17 ` Michael Tremer
2021-01-25 18:49 ` Kashif Iftikhar
0 siblings, 1 reply; 5+ messages in thread
From: Michael Tremer @ 2021-01-25 18:17 UTC (permalink / raw)
To: ddns
[-- Attachment #1: Type: text/plain, Size: 3406 bytes --]
Hi,
Thank you for updating the patch, but I think this is now what you wanted.
The data= argument is back again and so we will send some data to the server which the server won’t know what to do with.
You probably wanted to remove this, didn’t you?
-Michael
> On 22 Jan 2021, at 13:27, Kashif Iftikhar <kashif(a)compulife.com.pk> wrote:
>
> Hello Michael,
>
> Thank you for the feedback, I've sent updated (corrected) patch to ddns list.
>
> On Fri, Jan 22, 2021 at 6:03 PM Michael Tremer
> <michael.tremer(a)ipfire.org> wrote:
>>
>> Hello Kashif,
>>
>> Thank you for your email.
>>
>> If the data argument is no longer required, you should remove it entirely instead of just commenting it out.
>>
>> Otherwise this looks good.
>>
>> Best,
>> -Michael
>>
>>> On 22 Jan 2021, at 12:59, Kashif Iftikhar <kashif(a)compulife.com.pk> wrote:
>>>
>>> ------------------------BEGIN PATCH---------------------------
>>> From ed8e4a9e53cbd24e4a0450e3a8aa1c12359cbe2e Mon Sep 17 00:00:00 2001
>>> From: Kashif Iftikhar <kashif(a)compulife.com.pk>
>>> Date: Fri, 22 Jan 2021 17:33:01 +0500
>>> Subject: [PATCH 1/1] fixes freedns.afraid.org provider.
>>>
>>> The URL for syncing had changed and now does not require sending the ip
>>> with the request.
>>>
>>> Signed-off-by: Kashif Iftikhar <kashif(a)compulife.com.pk>
>>> ---
>>> src/ddns/providers.py | 14 +++++++-------
>>> 1 file changed, 7 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/src/ddns/providers.py b/src/ddns/providers.py
>>> index 56e6620..6feef33 100644
>>> --- a/src/ddns/providers.py
>>> +++ b/src/ddns/providers.py
>>> @@ -1186,26 +1186,26 @@ class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
>>>
>>> # No information about the request or response could be found on the vendor
>>> # page. All used values have been collected by testing.
>>> - url = "https://freedns.afraid.org/dynamic/update.php"
>>> + url = "https://sync.afraid.org/u/"
>>> can_remove_records = False
>>> supports_token_auth = True
>>>
>>> def update_protocol(self, proto):
>>> - data = {
>>> - "address" : self.get_address(proto),
>>> - }
>>> + # data = {
>>> + # "address" : self.get_address(proto),
>>> + # }
>>>
>>> # Add auth token to the update url.
>>> - url = "%s?%s" % (self.url, self.token)
>>> + url = "%s%s/" % (self.url, self.token)
>>>
>>> # Send update to the server.
>>> - response = self.send_request(url, data=data)
>>> + response = self.send_request(url)
>>>
>>> # Get the full response message.
>>> output = response.read().decode()
>>>
>>> # Handle success messages.
>>> - if output.startswith("Updated") or "has not changed" in output:
>>> + if output.startswith("Updated") or output.startswith("No IP
>>> change detected"):
>>> return
>>>
>>> # Handle error codes.
>>> --
>>> 2.25.1
>>>
>>>
>>> ------------------------END PATCH---------------------------
>>>
>>> Regards.
>>> Kashif Iftikhar
>>> http://kashif.compulife.com.pk
>>> _______________________________________________
>>> ddns mailing list
>>> ddns(a)lists.ipfire.org
>>> https://lists.ipfire.org/mailman/listinfo/ddns
>>
>
>
> --
> Kashif Iftikhar
> http://kashif.compulife.com.pk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fixes freedns.afraid.org ddns provider
2021-01-25 18:17 ` [PATCH] Fixes freedns.afraid.org ddns provider Michael Tremer
@ 2021-01-25 18:49 ` Kashif Iftikhar
2021-01-25 19:18 ` Michael Tremer
0 siblings, 1 reply; 5+ messages in thread
From: Kashif Iftikhar @ 2021-01-25 18:49 UTC (permalink / raw)
To: ddns
[-- Attachment #1: Type: text/plain, Size: 5816 bytes --]
Hi,
I think you're looking at the older email. The updated patch I posted
does not have the data argument. Pasting it here again just for
reference
------------------------BEGIN PATCH---------------------------
>From ca4865f02594666fc7e1a4578db3465555aae860 Mon Sep 17 00:00:00 2001
From: Kashif Iftikhar <kashif at compulife.com.pk>
Date: Fri, 22 Jan 2021 18:24:03 +0500
Subject: [PATCH 1/1] fixes freedns.afraid.org provider.
The URL for syncing had changed and now does not require sending the ip
with the request.
Signed-off-by: Kashif Iftikhar <kashif at compulife.com.pk>
---
src/ddns/providers.py | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/ddns/providers.py b/src/ddns/providers.py
index 56e6620..98d2747 100644
--- a/src/ddns/providers.py
+++ b/src/ddns/providers.py
@@ -1186,26 +1186,22 @@ class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
# No information about the request or response could be found on the vendor
# page. All used values have been collected by testing.
- url = "https://freedns.afraid.org/dynamic/update.php"
+ url = "https://sync.afraid.org/u/"
can_remove_records = False
supports_token_auth = True
def update_protocol(self, proto):
- data = {
- "address" : self.get_address(proto),
- }
-
# Add auth token to the update url.
- url = "%s?%s" % (self.url, self.token)
+ url = "%s%s/" % (self.url, self.token)
# Send update to the server.
- response = self.send_request(url, data=data)
+ response = self.send_request(url)
# Get the full response message.
output = response.read().decode()
# Handle success messages.
- if output.startswith("Updated") or "has not changed" in output:
+ if output.startswith("Updated") or output.startswith("No IP
change detected"):
return
# Handle error codes.
--
2.25.1
------------------------END PATCH---------------------------
Regards.
On Mon, Jan 25, 2021 at 11:17 PM Michael Tremer
<michael.tremer(a)ipfire.org> wrote:
>
> Hi,
>
> Thank you for updating the patch, but I think this is now what you wanted.
>
> The data= argument is back again and so we will send some data to the server which the server won’t know what to do with.
>
> You probably wanted to remove this, didn’t you?
>
> -Michael
>
> > On 22 Jan 2021, at 13:27, Kashif Iftikhar <kashif(a)compulife.com.pk> wrote:
> >
> > Hello Michael,
> >
> > Thank you for the feedback, I've sent updated (corrected) patch to ddns list.
> >
> > On Fri, Jan 22, 2021 at 6:03 PM Michael Tremer
> > <michael.tremer(a)ipfire.org> wrote:
> >>
> >> Hello Kashif,
> >>
> >> Thank you for your email.
> >>
> >> If the data argument is no longer required, you should remove it entirely instead of just commenting it out.
> >>
> >> Otherwise this looks good.
> >>
> >> Best,
> >> -Michael
> >>
> >>> On 22 Jan 2021, at 12:59, Kashif Iftikhar <kashif(a)compulife.com.pk> wrote:
> >>>
> >>> ------------------------BEGIN PATCH---------------------------
> >>> From ed8e4a9e53cbd24e4a0450e3a8aa1c12359cbe2e Mon Sep 17 00:00:00 2001
> >>> From: Kashif Iftikhar <kashif(a)compulife.com.pk>
> >>> Date: Fri, 22 Jan 2021 17:33:01 +0500
> >>> Subject: [PATCH 1/1] fixes freedns.afraid.org provider.
> >>>
> >>> The URL for syncing had changed and now does not require sending the ip
> >>> with the request.
> >>>
> >>> Signed-off-by: Kashif Iftikhar <kashif(a)compulife.com.pk>
> >>> ---
> >>> src/ddns/providers.py | 14 +++++++-------
> >>> 1 file changed, 7 insertions(+), 7 deletions(-)
> >>>
> >>> diff --git a/src/ddns/providers.py b/src/ddns/providers.py
> >>> index 56e6620..6feef33 100644
> >>> --- a/src/ddns/providers.py
> >>> +++ b/src/ddns/providers.py
> >>> @@ -1186,26 +1186,26 @@ class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
> >>>
> >>> # No information about the request or response could be found on the vendor
> >>> # page. All used values have been collected by testing.
> >>> - url = "https://freedns.afraid.org/dynamic/update.php"
> >>> + url = "https://sync.afraid.org/u/"
> >>> can_remove_records = False
> >>> supports_token_auth = True
> >>>
> >>> def update_protocol(self, proto):
> >>> - data = {
> >>> - "address" : self.get_address(proto),
> >>> - }
> >>> + # data = {
> >>> + # "address" : self.get_address(proto),
> >>> + # }
> >>>
> >>> # Add auth token to the update url.
> >>> - url = "%s?%s" % (self.url, self.token)
> >>> + url = "%s%s/" % (self.url, self.token)
> >>>
> >>> # Send update to the server.
> >>> - response = self.send_request(url, data=data)
> >>> + response = self.send_request(url)
> >>>
> >>> # Get the full response message.
> >>> output = response.read().decode()
> >>>
> >>> # Handle success messages.
> >>> - if output.startswith("Updated") or "has not changed" in output:
> >>> + if output.startswith("Updated") or output.startswith("No IP
> >>> change detected"):
> >>> return
> >>>
> >>> # Handle error codes.
> >>> --
> >>> 2.25.1
> >>>
> >>>
> >>> ------------------------END PATCH---------------------------
> >>>
> >>> Regards.
> >>> Kashif Iftikhar
> >>> http://kashif.compulife.com.pk
> >>> _______________________________________________
> >>> ddns mailing list
> >>> ddns(a)lists.ipfire.org
> >>> https://lists.ipfire.org/mailman/listinfo/ddns
> >>
> >
> >
> > --
> > Kashif Iftikhar
> > http://kashif.compulife.com.pk
>
--
Kashif Iftikhar
http://kashif.compulife.com.pk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fixes freedns.afraid.org ddns provider
2021-01-25 18:49 ` Kashif Iftikhar
@ 2021-01-25 19:18 ` Michael Tremer
0 siblings, 0 replies; 5+ messages in thread
From: Michael Tremer @ 2021-01-25 19:18 UTC (permalink / raw)
To: ddns
[-- Attachment #1: Type: text/plain, Size: 6243 bytes --]
Hello,
You might be right.
This one is the correct one:
https://patchwork.ipfire.org/patch/3816/
@Stefan: Can you merge this and tag a release?
Best,
-Michael
> On 25 Jan 2021, at 18:49, Kashif Iftikhar <kashif(a)compulife.com.pk> wrote:
>
> Hi,
>
> I think you're looking at the older email. The updated patch I posted
> does not have the data argument. Pasting it here again just for
> reference
>
> ------------------------BEGIN PATCH---------------------------
>> From ca4865f02594666fc7e1a4578db3465555aae860 Mon Sep 17 00:00:00 2001
> From: Kashif Iftikhar <kashif at compulife.com.pk>
> Date: Fri, 22 Jan 2021 18:24:03 +0500
> Subject: [PATCH 1/1] fixes freedns.afraid.org provider.
>
> The URL for syncing had changed and now does not require sending the ip
> with the request.
>
> Signed-off-by: Kashif Iftikhar <kashif at compulife.com.pk>
> ---
> src/ddns/providers.py | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/src/ddns/providers.py b/src/ddns/providers.py
> index 56e6620..98d2747 100644
> --- a/src/ddns/providers.py
> +++ b/src/ddns/providers.py
> @@ -1186,26 +1186,22 @@ class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
>
> # No information about the request or response could be found on the vendor
> # page. All used values have been collected by testing.
> - url = "https://freedns.afraid.org/dynamic/update.php"
> + url = "https://sync.afraid.org/u/"
> can_remove_records = False
> supports_token_auth = True
>
> def update_protocol(self, proto):
> - data = {
> - "address" : self.get_address(proto),
> - }
> -
> # Add auth token to the update url.
> - url = "%s?%s" % (self.url, self.token)
> + url = "%s%s/" % (self.url, self.token)
>
> # Send update to the server.
> - response = self.send_request(url, data=data)
> + response = self.send_request(url)
>
> # Get the full response message.
> output = response.read().decode()
>
> # Handle success messages.
> - if output.startswith("Updated") or "has not changed" in output:
> + if output.startswith("Updated") or output.startswith("No IP
> change detected"):
> return
>
> # Handle error codes.
> --
> 2.25.1
>
>
> ------------------------END PATCH---------------------------
>
> Regards.
>
> On Mon, Jan 25, 2021 at 11:17 PM Michael Tremer
> <michael.tremer(a)ipfire.org> wrote:
>>
>> Hi,
>>
>> Thank you for updating the patch, but I think this is now what you wanted.
>>
>> The data= argument is back again and so we will send some data to the server which the server won’t know what to do with.
>>
>> You probably wanted to remove this, didn’t you?
>>
>> -Michael
>>
>>> On 22 Jan 2021, at 13:27, Kashif Iftikhar <kashif(a)compulife.com.pk> wrote:
>>>
>>> Hello Michael,
>>>
>>> Thank you for the feedback, I've sent updated (corrected) patch to ddns list.
>>>
>>> On Fri, Jan 22, 2021 at 6:03 PM Michael Tremer
>>> <michael.tremer(a)ipfire.org> wrote:
>>>>
>>>> Hello Kashif,
>>>>
>>>> Thank you for your email.
>>>>
>>>> If the data argument is no longer required, you should remove it entirely instead of just commenting it out.
>>>>
>>>> Otherwise this looks good.
>>>>
>>>> Best,
>>>> -Michael
>>>>
>>>>> On 22 Jan 2021, at 12:59, Kashif Iftikhar <kashif(a)compulife.com.pk> wrote:
>>>>>
>>>>> ------------------------BEGIN PATCH---------------------------
>>>>> From ed8e4a9e53cbd24e4a0450e3a8aa1c12359cbe2e Mon Sep 17 00:00:00 2001
>>>>> From: Kashif Iftikhar <kashif(a)compulife.com.pk>
>>>>> Date: Fri, 22 Jan 2021 17:33:01 +0500
>>>>> Subject: [PATCH 1/1] fixes freedns.afraid.org provider.
>>>>>
>>>>> The URL for syncing had changed and now does not require sending the ip
>>>>> with the request.
>>>>>
>>>>> Signed-off-by: Kashif Iftikhar <kashif(a)compulife.com.pk>
>>>>> ---
>>>>> src/ddns/providers.py | 14 +++++++-------
>>>>> 1 file changed, 7 insertions(+), 7 deletions(-)
>>>>>
>>>>> diff --git a/src/ddns/providers.py b/src/ddns/providers.py
>>>>> index 56e6620..6feef33 100644
>>>>> --- a/src/ddns/providers.py
>>>>> +++ b/src/ddns/providers.py
>>>>> @@ -1186,26 +1186,26 @@ class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
>>>>>
>>>>> # No information about the request or response could be found on the vendor
>>>>> # page. All used values have been collected by testing.
>>>>> - url = "https://freedns.afraid.org/dynamic/update.php"
>>>>> + url = "https://sync.afraid.org/u/"
>>>>> can_remove_records = False
>>>>> supports_token_auth = True
>>>>>
>>>>> def update_protocol(self, proto):
>>>>> - data = {
>>>>> - "address" : self.get_address(proto),
>>>>> - }
>>>>> + # data = {
>>>>> + # "address" : self.get_address(proto),
>>>>> + # }
>>>>>
>>>>> # Add auth token to the update url.
>>>>> - url = "%s?%s" % (self.url, self.token)
>>>>> + url = "%s%s/" % (self.url, self.token)
>>>>>
>>>>> # Send update to the server.
>>>>> - response = self.send_request(url, data=data)
>>>>> + response = self.send_request(url)
>>>>>
>>>>> # Get the full response message.
>>>>> output = response.read().decode()
>>>>>
>>>>> # Handle success messages.
>>>>> - if output.startswith("Updated") or "has not changed" in output:
>>>>> + if output.startswith("Updated") or output.startswith("No IP
>>>>> change detected"):
>>>>> return
>>>>>
>>>>> # Handle error codes.
>>>>> --
>>>>> 2.25.1
>>>>>
>>>>>
>>>>> ------------------------END PATCH---------------------------
>>>>>
>>>>> Regards.
>>>>> Kashif Iftikhar
>>>>> http://kashif.compulife.com.pk
>>>>> _______________________________________________
>>>>> ddns mailing list
>>>>> ddns(a)lists.ipfire.org
>>>>> https://lists.ipfire.org/mailman/listinfo/ddns
>>>>
>>>
>>>
>>> --
>>> Kashif Iftikhar
>>> http://kashif.compulife.com.pk
>>
>
>
> --
> Kashif Iftikhar
> http://kashif.compulife.com.pk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fixes freedns.afraid.org ddns provider
2021-01-22 12:59 ` Kashif Iftikhar
@ 2021-01-22 13:03 ` Michael Tremer
0 siblings, 0 replies; 5+ messages in thread
From: Michael Tremer @ 2021-01-22 13:03 UTC (permalink / raw)
To: ddns
[-- Attachment #1: Type: text/plain, Size: 2613 bytes --]
Hello Kashif,
Thank you for your email.
If the data argument is no longer required, you should remove it entirely instead of just commenting it out.
Otherwise this looks good.
Best,
-Michael
> On 22 Jan 2021, at 12:59, Kashif Iftikhar <kashif(a)compulife.com.pk> wrote:
>
> ------------------------BEGIN PATCH---------------------------
> From ed8e4a9e53cbd24e4a0450e3a8aa1c12359cbe2e Mon Sep 17 00:00:00 2001
> From: Kashif Iftikhar <kashif(a)compulife.com.pk>
> Date: Fri, 22 Jan 2021 17:33:01 +0500
> Subject: [PATCH 1/1] fixes freedns.afraid.org provider.
>
> The URL for syncing had changed and now does not require sending the ip
> with the request.
>
> Signed-off-by: Kashif Iftikhar <kashif(a)compulife.com.pk>
> ---
> src/ddns/providers.py | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/src/ddns/providers.py b/src/ddns/providers.py
> index 56e6620..6feef33 100644
> --- a/src/ddns/providers.py
> +++ b/src/ddns/providers.py
> @@ -1186,26 +1186,26 @@ class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
>
> # No information about the request or response could be found on the vendor
> # page. All used values have been collected by testing.
> - url = "https://freedns.afraid.org/dynamic/update.php"
> + url = "https://sync.afraid.org/u/"
> can_remove_records = False
> supports_token_auth = True
>
> def update_protocol(self, proto):
> - data = {
> - "address" : self.get_address(proto),
> - }
> + # data = {
> + # "address" : self.get_address(proto),
> + # }
>
> # Add auth token to the update url.
> - url = "%s?%s" % (self.url, self.token)
> + url = "%s%s/" % (self.url, self.token)
>
> # Send update to the server.
> - response = self.send_request(url, data=data)
> + response = self.send_request(url)
>
> # Get the full response message.
> output = response.read().decode()
>
> # Handle success messages.
> - if output.startswith("Updated") or "has not changed" in output:
> + if output.startswith("Updated") or output.startswith("No IP
> change detected"):
> return
>
> # Handle error codes.
> --
> 2.25.1
>
>
> ------------------------END PATCH---------------------------
>
> Regards.
> Kashif Iftikhar
> http://kashif.compulife.com.pk
> _______________________________________________
> ddns mailing list
> ddns(a)lists.ipfire.org
> https://lists.ipfire.org/mailman/listinfo/ddns
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Fixes freedns.afraid.org ddns provider
[not found] <CAHoP+V9CfCQ3NCK5-Kfxn=OPYEz8ic-t4rC++pWS=erEXzgebA@mail.gmail.com>
@ 2021-01-22 12:59 ` Kashif Iftikhar
2021-01-22 13:03 ` Michael Tremer
0 siblings, 1 reply; 5+ messages in thread
From: Kashif Iftikhar @ 2021-01-22 12:59 UTC (permalink / raw)
To: ddns
[-- Attachment #1: Type: text/plain, Size: 2062 bytes --]
------------------------BEGIN PATCH---------------------------
>From ed8e4a9e53cbd24e4a0450e3a8aa1c12359cbe2e Mon Sep 17 00:00:00 2001
From: Kashif Iftikhar <kashif(a)compulife.com.pk>
Date: Fri, 22 Jan 2021 17:33:01 +0500
Subject: [PATCH 1/1] fixes freedns.afraid.org provider.
The URL for syncing had changed and now does not require sending the ip
with the request.
Signed-off-by: Kashif Iftikhar <kashif(a)compulife.com.pk>
---
src/ddns/providers.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/ddns/providers.py b/src/ddns/providers.py
index 56e6620..6feef33 100644
--- a/src/ddns/providers.py
+++ b/src/ddns/providers.py
@@ -1186,26 +1186,26 @@ class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
# No information about the request or response could be found on the vendor
# page. All used values have been collected by testing.
- url = "https://freedns.afraid.org/dynamic/update.php"
+ url = "https://sync.afraid.org/u/"
can_remove_records = False
supports_token_auth = True
def update_protocol(self, proto):
- data = {
- "address" : self.get_address(proto),
- }
+ # data = {
+ # "address" : self.get_address(proto),
+ # }
# Add auth token to the update url.
- url = "%s?%s" % (self.url, self.token)
+ url = "%s%s/" % (self.url, self.token)
# Send update to the server.
- response = self.send_request(url, data=data)
+ response = self.send_request(url)
# Get the full response message.
output = response.read().decode()
# Handle success messages.
- if output.startswith("Updated") or "has not changed" in output:
+ if output.startswith("Updated") or output.startswith("No IP
change detected"):
return
# Handle error codes.
--
2.25.1
------------------------END PATCH---------------------------
Regards.
Kashif Iftikhar
http://kashif.compulife.com.pk
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-25 19:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAHoP+V8qk=kZoB2MJ1nv1yKiz4oxfuDRFKx4Nvs=QGza07K7SQ@mail.gmail.com>
2021-01-25 18:17 ` [PATCH] Fixes freedns.afraid.org ddns provider Michael Tremer
2021-01-25 18:49 ` Kashif Iftikhar
2021-01-25 19:18 ` Michael Tremer
[not found] <CAHoP+V9CfCQ3NCK5-Kfxn=OPYEz8ic-t4rC++pWS=erEXzgebA@mail.gmail.com>
2021-01-22 12:59 ` Kashif Iftikhar
2021-01-22 13:03 ` Michael Tremer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox