Todo #15779
closedUpdate Dynamic DNS API URL for porkbun.com
100%
Description
Got a email today from Porkbun regarding their URL change for API from "porkbun.com" to "api.porkbun.com". Deadline 2024-12-01.
https://porkbun.com/api/json/v3/documentation#apiHost
This change impact DynDNS and ACME. I guess this fix would only solve the DynDNS part.
I might have missed some and maybe even need to be changed in other files.
pfsense/src/etc/inc/dyndns.class
967 - $porkbun_api = "https://porkbun.com/api/json/v3/dns/retrieve/{$this->_dnsDomain}";
967 + $porkbun_api = "https://api.porkbun.com/api/json/v3/dns/retrieve/{$this->_dnsDomain}";
1002 - $porkbun_api = "https://porkbun.com/api/json/v3/dns/create/{$this->_dnsDomain}";
1002 + $porkbun_api = "https://api.porkbun.com/api/json/v3/dns/create/{$this->_dnsDomain}";
1008 - $porkbun_api = "https://porkbun.com/api/json/v3/dns/edit/{$this->_dnsDomain}/{$record_id}";
1009 + $porkbun_api = "https://api.porkbun.com/api/json/v3/dns/edit/{$this->_dnsDomain}/{$record_id}";
Updated by Nita Vesa about 1 month ago
Emanuel Persson wrote:
Got a email today from Porkbun regarding their URL change for API from "porkbun.com" to "api.porkbun.com". Deadline 2024-12-01.
https://porkbun.com/api/json/v3/documentation#apiHostThis change impact DynDNS and ACME. I guess this fix would only solve the DynDNS part.
I might have missed some and maybe even need to be changed in other files.
pfsense/src/etc/inc/dyndns.class
[...]
I have created a pull request for this at https://github.com/pfsense/pfsense/pull/4708 . I was just about to open a new ticket here only to find one already exists, so that was nice.
Updated by Marcos M about 1 month ago
- Tracker changed from Bug to Todo
- Subject changed from Dyndns.class URL change to api.porkbun.com to Update DDNS API URL for porkbun.com
- Status changed from New to Resolved
- Target version set to 2.8.0
- % Done changed from 0 to 100
- Plus Target Version set to 24.11
- Affected Version deleted (
All) - Affected Architecture deleted (
All)
Updated by Jim Pingle 16 days ago
- Subject changed from Update DDNS API URL for porkbun.com to Update Dynamic DNS API URL for porkbun.com
Updated by Adrien Carlyle 13 days ago
Patch for testing on 24.03, path strip count = 2
diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class
index 3eebe195f0b..1875d4d1098 100644
--- a/src/etc/inc/dyndns.class
+++ b/src/etc/inc/dyndns.class
@@ -142,7 +142,7 @@
* ODS - Last Tested: 02 August 2005
* OpenDNS - Last Tested: 4 August 2008
* OVH DynHOST - Last Tested: NEVER
- * Porkbun - Last Tested: 26 June 2023
+ * Porkbun - Last Tested: 22 October 2024
* SelfHost - Last Tested: 26 December 2011
* SPDYN - Last Tested: 02 July 2016
* SPDYN IPv6 - Last Tested: 02 July 2016
@@ -963,8 +963,8 @@
break;
case 'porkbun':
case 'porkbun-v6':
- // API documentation: https://porkbun.com/api/json/v3/documentation
- $porkbun_api = "https://porkbun.com/api/json/v3/dns/retrieve/{$this->_dnsDomain}";
+ // API documentation: https://api.porkbun.com/api/json/v3/documentation
+ $porkbun_api = "https://api.porkbun.com/api/json/v3/dns/retrieve/{$this->_dnsDomain}";
$record_type = $this->_useIPv6 ? "AAAA" : "A";
// Check if a record already exists for this host.
$post_data['apikey'] = $this->_dnsUser;
@@ -999,13 +999,13 @@
// No record exists for this host, add one.
if (!$record_id)
{
- $porkbun_api = "https://porkbun.com/api/json/v3/dns/create/{$this->_dnsDomain}";
+ $porkbun_api = "https://api.porkbun.com/api/json/v3/dns/create/{$this->_dnsDomain}";
if ($this->_dnsHost == "@" || $this->_dnsHost == "")
$post_data['name'] = "";
else
$post_data['name'] = $this->_dnsHost;
} else {
- $porkbun_api = "https://porkbun.com/api/json/v3/dns/edit/{$this->_dnsDomain}/{$record_id}";
+ $porkbun_api = "https://api.porkbun.com/api/json/v3/dns/edit/{$this->_dnsDomain}/{$record_id}";
$post_data['name'] = $this->_dnsHost;
}
$post_data['type'] = $record_type;