diff --git a/interface/super/manage_site_files.php b/interface/super/manage_site_files.php
index 4e9b92db7..bd67dc324 100644
--- a/interface/super/manage_site_files.php
+++ b/interface/super/manage_site_files.php
@@ -22,42 +22,10 @@
if (!acl_check('admin', 'super')) die(htmlspecialchars(xl('Not authorized')));
-// Prepare array of names of editable files, relative to the site directory.
-$my_files = array(
- 'config.php',
- 'faxcover.txt',
- 'faxtitle.eps',
- 'referral_template.html',
- 'statement.inc.php',
- 'letter_templates/custom_pdf.php',
- 'menu_data.json',
-);
-// Append LBF plugin filenames to the array.
-$lres = sqlStatement('SELECT * FROM list_options ' .
- "WHERE list_id = 'lbfnames' ORDER BY seq, title");
-while ($lrow = sqlFetchArray($lres)) {
- $option_id = $lrow['option_id']; // should start with LBF
- $title = $lrow['title'];
- $my_files[] = "LBF/$option_id.plugin.php";
-}
-
-$form_filename = strip_escape_custom($_REQUEST['form_filename']);
-// Sanity check to prevent evildoing.
-if (!in_array($form_filename, $my_files)) $form_filename = '';
-$filepath = "$OE_SITE_DIR/$form_filename";
-
$imagedir = "$OE_SITE_DIR/images";
$educationdir = "$OE_SITE_DIR/filemanager/files/education";
if (!empty($_POST['bn_save'])) {
- if ($form_filename) {
- // Textareas, at least in Firefox, return a \r\n at the end of each line
- // even though only \n was originally there. For consistency with
- // normal LibreEHR usage we translate those back.
- file_put_contents($filepath, str_replace("\r\n", "\n",
- $_POST['form_filedata']));
- $form_filename = '';
- }
$number_of_files = count($_FILES['form_image']['name']);
for ($i=0; $i <$number_of_files ; $i++) {
@@ -150,31 +118,6 @@ function msfFileChanged() {
-
- |
-
-
-
-
-
-
-
- |
-
-
|
diff --git a/interface/super/rules/controllers/browse/controller.php b/interface/super/rules/controllers/browse/controller.php
index b7d9fc52f..2ea280a03 100644
--- a/interface/super/rules/controllers/browse/controller.php
+++ b/interface/super/rules/controllers/browse/controller.php
@@ -15,7 +15,11 @@ function _action_list() {
}
function _action_plans_config() {
- $this->set_view( "plans_config.php" );
+ // This file isn't currently being used and plans_config.php has security vulnerabilities.
+ // Thus, the original code has been commented out and an error message is displayed instead.
+
+ // $this->set_view( "plans_config.php" );
+ $this->_action_error();
}
function _action_getrows() {
diff --git a/patient_portal/patient/scripts/app/onsitedocuments.js b/patient_portal/patient/scripts/app/onsitedocuments.js
index 2c94a47b7..2d21d677f 100644
--- a/patient_portal/patient/scripts/app/onsitedocuments.js
+++ b/patient_portal/patient/scripts/app/onsitedocuments.js
@@ -279,30 +279,36 @@ var page = {
restoreDocumentEdits();
}
else{
- var liburl = webRoot+'/patient_portal/lib/download_template.php';
- $.ajax({
- type: "POST",
- url: liburl,
- data: {docid: docname, pid: pid},
- beforeSend: function(xhr){
- console.log("Please wait...");
- },
- error: function(qXHR, textStatus, errorThrow){
- console.log("There was an error");
- },
- success: function(templateHtml, textStatus, jqXHR){
- $("#docid").val(docname);
- $('#templatecontent').empty().append(templateHtml);
- if( isNewDoc ){
- isNewDoc = false;
- page.isSaved = false;
- $("#printTemplate").hide();
- $("#submitTemplate").hide();
- $("#sendTemplate").hide();
- page.onsiteDocument.set('fullDocument',templateHtml);
- }
- }
- });
+ // This file isn't currently being used and download_template.php includes security vulnerabilites.
+ // Thus, the original code has been commented out and an error message is displayed instead.
+
+ // var liburl = webRoot+'/patient_portal/lib/download_template.php';
+ // $.ajax({
+ // type: "POST",
+ // url: liburl,
+ // data: {docid: docname, pid: pid},
+ // beforeSend: function(xhr){
+ // console.log("Please wait...");
+ // },
+ // error: function(qXHR, textStatus, errorThrow){
+ // console.log("There was an error");
+ // },
+ // success: function(templateHtml, textStatus, jqXHR){
+ // $("#docid").val(docname);
+ // $('#templatecontent').empty().append(templateHtml);
+ // if( isNewDoc ){
+ // isNewDoc = false;
+ // page.isSaved = false;
+ // $("#printTemplate").hide();
+ // $("#submitTemplate").hide();
+ // $("#sendTemplate").hide();
+ // page.onsiteDocument.set('fullDocument',templateHtml);
+ // }
+ // }
+ // });
+
+ app.appendAlert('An unexpected error has occurred.', 'alert-error',0,'modelAlert');
+ app.hideProgress('modelLoader');
}
var cdate = page.onsiteDocument.get('createDate')
var s = page.onsiteDocument.get('denialReason')
diff --git a/templates/documents/general_upload.php b/templates/documents/general_upload.php
index 3964ab172..65b16d2de 100644
--- a/templates/documents/general_upload.php
+++ b/templates/documents/general_upload.php
@@ -48,19 +48,6 @@
-
-
-
-
file)) {?>