[PR #199] [CLOSED] WIP: Place brackets around the hostname #202

Closed
opened 2026-02-28 01:21:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tuxis-ie/nsedit/pull/199
Author: @WilliamDEdwards
Created: 3/21/2022
Status: Closed

Base: masterHead: fix/brackets-baseurl-ip


📝 Commits (3)

  • ff2a224 Place brackets around the hostname
  • 6249c09 Only add brackets for IPv6
  • 78afb91 Make sure $ip is defined

📊 Changes

1 file changed (+7 additions, -1 deletions)

View changed files

📝 includes/class/ApiHandler.php (+7 -1)

📄 Description

When setting $apiip to an IPv6 address, requests to the PowerDNS API fail with cURL error 0 and an empty curl_error. This is because cURL doesn't understand we're working with an IPv6 address. This should be fixed by placing brackets around the address.

This PR is not finished. AFAIK, we don't have to check the address family, because placing brackets around an IPv4 address works. However, we still don't know whether we're dealing with a hostname or not.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tuxis-ie/nsedit/pull/199 **Author:** [@WilliamDEdwards](https://github.com/WilliamDEdwards) **Created:** 3/21/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/brackets-baseurl-ip` --- ### 📝 Commits (3) - [`ff2a224`](https://github.com/tuxis-ie/nsedit/commit/ff2a224d4f55c9810933e9a1985ba804fedd1903) Place brackets around the hostname - [`6249c09`](https://github.com/tuxis-ie/nsedit/commit/6249c099a9d46a4099c74915176498e57a01829e) Only add brackets for IPv6 - [`78afb91`](https://github.com/tuxis-ie/nsedit/commit/78afb914da479fe82df169119852ee56045b4acf) Make sure $ip is defined ### 📊 Changes **1 file changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `includes/class/ApiHandler.php` (+7 -1) </details> ### 📄 Description When setting `$apiip` to an IPv6 address, requests to the PowerDNS API fail with cURL error 0 and an empty `curl_error`. This is because cURL doesn't understand we're working with an IPv6 address. This should be fixed by placing brackets around the address. This PR is not finished. AFAIK, we don't have to check the address family, because placing brackets around an IPv4 address works. However, we still don't know whether we're dealing with a hostname or not. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 01:21:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsedit#202
No description provided.