From ef7590fb7367ee87a444ef8a99c25b622bc3741b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Eixarch?= Date: Sat, 24 Nov 2012 00:26:48 +0100 Subject: [PATCH 1/3] Fix 1203: non-escaped html in plugins info --- src/templates/admin/plugins-info.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/templates/admin/plugins-info.html b/src/templates/admin/plugins-info.html index 22f87073..b361e9cf 100644 --- a/src/templates/admin/plugins-info.html +++ b/src/templates/admin/plugins-info.html @@ -14,17 +14,17 @@

Installed plugins

-
<%= plugins.formatPlugins() %>
+
<%- plugins.formatPlugins() %>

Installed parts

-
<%= plugins.formatParts() %>
+
<%- plugins.formatParts() %>

Installed hooks

Server side hooks

-
<%= plugins.formatHooks() %>
+
<%- plugins.formatHooks() %>

Client side hooks

-
<%= plugins.formatHooks("client_hooks") %>
+
<%- plugins.formatHooks("client_hooks") %>
From bf04a4686a3df9b38788646b6677a8e699454bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Eixarch?= Date: Thu, 6 Dec 2012 11:49:04 +0100 Subject: [PATCH 2/3] avoid use of os.tmpDir() for node 0.6 compatibility --- src/node/handler/ImportHandler.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index 815e5357..6bf223f2 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -33,6 +33,9 @@ var ERR = require("async-stacktrace") //load abiword only if its enabled if(settings.abiword != null) var abiword = require("../utils/Abiword"); + +//for node 0.6 compatibily, os.tmpDir() only works from 0.8 +var tmpDirectory = process.env.TEMP || process.env.TMPDIR || process.env.TMP || '/tmp'; /** * do a requested import @@ -52,6 +55,7 @@ exports.doImport = function(req, res, padId) function(callback) { var form = new formidable.IncomingForm(); form.keepExtensions = true; + form.uploadDir = tmpDirectory; form.parse(req, function(err, fields, files) { //the upload failed, stop at this point @@ -91,7 +95,7 @@ exports.doImport = function(req, res, padId) //convert file to html function(callback) { var randNum = Math.floor(Math.random()*0xFFFFFFFF); - destFile = path.join(os.tmpDir(), "eplite_import_" + randNum + ".htm"); + destFile = path.join(tmpDirectory, "eplite_import_" + randNum + ".htm"); if (abiword) { abiword.convertFile(srcFile, destFile, "htm", function(err) { From 1a5035ae6bd222bb1e6e905bf3baf7ba3dfa93dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Eixarch?= Date: Thu, 6 Dec 2012 11:53:58 +0100 Subject: [PATCH 3/3] reverse old change --- src/templates/admin/plugins-info.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/admin/plugins-info.html b/src/templates/admin/plugins-info.html index b32c51a1..94f94e2a 100644 --- a/src/templates/admin/plugins-info.html +++ b/src/templates/admin/plugins-info.html @@ -17,7 +17,7 @@
<%- plugins.formatPlugins().replace(", ","\n") %>

Installed parts

-
<%- plugins.formatParts() %>
+
<%= plugins.formatParts() %>

Installed hooks

Server side hooks