Bug #4369
closed
patch fetching doesn't work if pfsense is behind proxy
Added by Anonymous over 10 years ago.
Updated almost 10 years ago.
Description
Hello,
while i was testing a patch (Bug #4238) i noted that the fetch doesn't work.
Issuing a packet caputure while fetching the patch url i noted that pfsense is trying to connect to the github site directly instead using the configured proxy.
Regards
- Project changed from pfSense to pfSense Packages
- Category deleted (
Unknown)
- Target version deleted (
2.2.1)
- Affected Version deleted (
2.2)
You can use this on pfSense 2.2 and newer:
--- a/usr/local/pkg/patches.inc 2015-11-07 01:54:53.289589099 +0100
+++ b/usr/local/pkg/patches.inc 2015-11-12 17:18:47.479996587 +0100
@@ -29,6 +29,7 @@
*/
require_once("globals.inc");
require_once("util.inc");
+require_once("pfsense-utils.inc");
global $git_root_url, $patch_suffix, $patch_dir, $patch_cmd;
$git_root_url = "https://github.com/pfsense/pfsense/commit/";
@@ -88,8 +89,12 @@
/* Fetch a patch from a URL or github */
function patch_fetch(& $patch) {
+ global $g;
$url = patch_fixup_url($patch['location']);
- $text = @file_get_contents($url);
+ $temp_filename = tempnam("{$g['tmp_path']}/", "system_patches");
+ download_file($url, $temp_filename);
+ $text = @file_get_contents($temp_filename);
+ unlink($temp_filename);
if (empty($text)) {
return false;
} else {
- Category set to System Patches
- Status changed from New to Resolved
Problem remains in v. 2.2.5.
It'd help if you actually updated the System Patches package... This has nothing to do with pfSense version.
Also available in: Atom
PDF