From 502bb0945280d409e33b3a3eaaa3ff1596705828 Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 7 Sep 2012 13:32:44 -0400 Subject: Set the user credentials in curl rather than forming a URI with the user:pass, as the latter has issues if the password contains certain symbols such as @. --- config/autoconfigbackup/autoconfigbackup.inc | 3 ++- config/autoconfigbackup/autoconfigbackup.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/autoconfigbackup/autoconfigbackup.inc b/config/autoconfigbackup/autoconfigbackup.inc index fc9fb98d..0286ffec 100644 --- a/config/autoconfigbackup/autoconfigbackup.inc +++ b/config/autoconfigbackup/autoconfigbackup.inc @@ -82,10 +82,11 @@ function test_connection($post) { $hostname = $config['system']['hostname'] . "." . $config['system']['domain']; // URL to restore.php - $get_url = "https://{$username}:{$password}@portal.pfsense.org/pfSconfigbackups/restore.php"; + $get_url = "https://portal.pfsense.org/pfSconfigbackups/restore.php"; // Populate available backups $curl_session = curl_init(); + curl_setopt($curl_session, CURLOPT_USERPWD, "{$username}:{$password}"); curl_setopt($curl_session, CURLOPT_URL, $get_url); curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl_session, CURLOPT_POST, 1); diff --git a/config/autoconfigbackup/autoconfigbackup.xml b/config/autoconfigbackup/autoconfigbackup.xml index 406221bf..a7640f7e 100644 --- a/config/autoconfigbackup/autoconfigbackup.xml +++ b/config/autoconfigbackup/autoconfigbackup.xml @@ -37,7 +37,7 @@ Automatically backs up your pfSense configuration. All contents are encrypted on the server. Requires pfSense Premium Support Portal Subscription from https://portal.pfsense.org pfSense Premium Support Portal AutoConfigBackup - 1.0 + 1.20 Diagnostics: Auto Configuration Backup Change /usr/local/pkg/autoconfigbackup.inc -- cgit v1.2.3