From 86584ded30c27b9ad1b017fb743399dc01180f02 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 7 Nov 2016 13:49:19 -0500 Subject: Store Dynamic DNS passwords in Base64 to protect special characters. Fixes #6688 --- src/etc/inc/upgrade_config.inc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/etc/inc/upgrade_config.inc') diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 4f9874f..842ec0e 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -5011,4 +5011,21 @@ function upgrade_156_to_157() { } } +function upgrade_157_to_158() { + global $config; + /* Convert Dynamic DNS passwords to base64 encoding. Redmine #6688 */ + + if (!is_array($config['dyndnses'])) { + $config['dyndnses'] = array(); + } + if (!is_array($config['dyndnses']['dyndns'])) { + $config['dyndnses']['dyndns'] = array(); + } + $a_dyndns = &$config['dyndnses']['dyndns']; + + foreach ($a_dyndns as &$dyndns) { + $dyndns['password'] = base64_encode($dyndns['password']); + } +} + ?> -- cgit v1.1