Skip to content

Commit

Permalink
Set the user credentials in curl rather than forming a URI with the u…
Browse files Browse the repository at this point in the history
…ser:pass, as the latter has issues if the password contains certain symbols such as @.
  • Loading branch information
jim-p committed Sep 7, 2012
1 parent 4c831fa commit 502bb09
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion config/autoconfigbackup/autoconfigbackup.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion config/autoconfigbackup/autoconfigbackup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<description>Automatically backs up your pfSense configuration. All contents are encrypted on the server. Requires pfSense Premium Support Portal Subscription from https://portal.pfsense.org</description>
<requirements>pfSense Premium Support Portal</requirements>
<name>AutoConfigBackup</name>
<version>1.0</version>
<version>1.20</version>
<title>Diagnostics: Auto Configuration Backup</title>
<savetext>Change</savetext>
<include_file>/usr/local/pkg/autoconfigbackup.inc</include_file>
Expand Down
2 changes: 1 addition & 1 deletion pkg_config.7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@
<descr>Automatically backs up your pfSense configuration. All contents are encrypted on the server. Requires pfSense Premium Support Portal Subscription from https://portal.pfsense.org</descr>
<website>https://portal.pfsense.org</website>
<category>Services</category>
<version>1.19</version>
<version>1.20</version>
<status>Stable</status>
<required_version>1.2</required_version>
<pkginfolink>http://doc.pfsense.org/index.php/AutoConfigBackup</pkginfolink>
Expand Down
2 changes: 1 addition & 1 deletion pkg_config.8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@
<descr>Automatically backs up your pfSense configuration. All contents are encrypted on the server. Requires pfSense Premium Support Portal Subscription from https://portal.pfsense.org</descr>
<website>https://portal.pfsense.org</website>
<category>Services</category>
<version>1.19</version>
<version>1.20</version>
<status>Stable</status>
<required_version>1.2</required_version>
<pkginfolink>http://doc.pfsense.org/index.php/AutoConfigBackup</pkginfolink>
Expand Down
2 changes: 1 addition & 1 deletion pkg_config.8.xml.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@
<descr>Automatically backs up your pfSense configuration. All contents are encrypted on the server. Requires pfSense Premium Support Portal Subscription from https://portal.pfsense.org</descr>
<website>https://portal.pfsense.org</website>
<category>Services</category>
<version>1.19</version>
<version>1.20</version>
<status>Stable</status>
<required_version>1.2</required_version>
<pkginfolink>http://doc.pfsense.org/index.php/AutoConfigBackup</pkginfolink>
Expand Down

0 comments on commit 502bb09

Please sign in to comment.