diff options
author | jim-p <jimp@pfsense.org> | 2012-05-07 13:39:42 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-05-07 13:39:42 -0400 |
commit | af9133e026a27b5007c268c4b6598a9b4d89ee31 (patch) | |
tree | 733b647b78b09da025a4669b3b49affed72f32a7 /config/systempatches | |
parent | a853b2cc32e538eb033c50ffe6092af08011c235 (diff) | |
download | pfsense-packages-af9133e026a27b5007c268c4b6598a9b4d89ee31.tar.gz pfsense-packages-af9133e026a27b5007c268c4b6598a9b4d89ee31.tar.bz2 pfsense-packages-af9133e026a27b5007c268c4b6598a9b4d89ee31.zip |
Ensure we don't save DOS style newlines from the textarea.
Diffstat (limited to 'config/systempatches')
-rw-r--r-- | config/systempatches/system_patches_edit.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/systempatches/system_patches_edit.php b/config/systempatches/system_patches_edit.php index bfa0af36..32318620 100644 --- a/config/systempatches/system_patches_edit.php +++ b/config/systempatches/system_patches_edit.php @@ -100,7 +100,8 @@ if ($_POST) { $thispatch['descr'] = $_POST['descr']; $thispatch['location'] = patch_fixup_url($_POST['location']); if (!empty($_POST['patch'])) { - $thispatch['patch'] = base64_encode($_POST['patch']); + /* Strip DOS style carriage returns from textarea input */ + $thispatch['patch'] = base64_encode(str_replace("\r", "", $_POST['patch'])); } if (is_github_url($thispatch['location']) && ($_POST['pathstrip'] == 0)) $thispatch['pathstrip'] = 1; |