summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorfrank <frankthetank@users.noreply.github.com>2017-02-26 15:04:53 -0500
committerfrank <frankthetank@users.noreply.github.com>2017-02-26 15:04:53 -0500
commita71deb5a634df93c11ed7a25c2ea001edb273127 (patch)
treed8adab1015dfa3c9f847c5ff87d128012f4fccfa /src/etc
parent9a3ec9a5917bbb3d9978dec769cf895eb56422e8 (diff)
downloadpfsense-a71deb5a634df93c11ed7a25c2ea001edb273127.zip
pfsense-a71deb5a634df93c11ed7a25c2ea001edb273127.tar.gz
Switched API key usage from username to password fields for protection.
This prevents accidentally leaking the Dreamhost API key to casual router administrators.
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/dyndns.class8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class
index 72d3f23..1c3a5fc 100644
--- a/src/etc/inc/dyndns.class
+++ b/src/etc/inc/dyndns.class
@@ -840,14 +840,14 @@
$needsIP = TRUE;
$isv6 = ($this->_dnsService === 'dreamhost-v6');
$server = 'https://api.dreamhost.com/';
- $post_data['key'] = $this->_dnsUser;
+ $post_data['key'] = $this->_dnsPass;
$post_data['unique_id'] = uniqid($this->_dnsHost);
$post_data['cmd'] = 'dns-add_record';
$post_data['format'] = 'json';
$post_data['value'] = $this->_dnsIP;
$post_data['record'] = $this->_dnsHost;
$post_data['type'] = $isv6 ? 'AAAA' : 'A';
- $post_data['comment'] = "Updated by pfsense on ".date('c');
+ $post_data['comment'] = "Updated by pfSense:$this->_dnsUser on ".date('c');
$port = "";
if ($this->_dnsServer) {
$server = $this->_dnsServer;
@@ -910,7 +910,7 @@
case 'dreamhost':
case 'dreamhost-v6':
$server = 'https://api.dreamhost.com/';
- $post_data['key'] = $this->_dnsUser;
+ $post_data['key'] = $this->_dnsPass;
$post_data['unique_id'] = uniqid($this->_dnsHost);
$post_data['cmd'] = 'dns-remove_record';
$post_data['format'] = 'json';
@@ -978,7 +978,7 @@
case 'dreamhost':
case 'dreamhost-v6':
$server = 'https://api.dreamhost.com/';
- $post_data['key'] = $this->_dnsUser;
+ $post_data['key'] = $this->_dnsPass;
$post_data['unique_id'] = uniqid($this->_dnsHost);
$post_data['cmd'] = 'dns-list_records';
$post_data['format'] = 'json';
OpenPOWER on IntegriCloud