diff --git a/customize.dist/BottomBar.html b/customize.dist/BottomBar.html
deleted file mode 100644
index c8d43dfce..000000000
--- a/customize.dist/BottomBar.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
diff --git a/customize.dist/bg.jpg b/customize.dist/bg.jpg
deleted file mode 100644
index fa5214591..000000000
Binary files a/customize.dist/bg.jpg and /dev/null differ
diff --git a/customize.dist/bg2.jpg b/customize.dist/bg2.jpg
deleted file mode 100644
index a7598eee1..000000000
Binary files a/customize.dist/bg2.jpg and /dev/null differ
diff --git a/customize.dist/fr.png b/customize.dist/fr.png
deleted file mode 100644
index 8332c4ec2..000000000
Binary files a/customize.dist/fr.png and /dev/null differ
diff --git a/customize.dist/heart.png b/customize.dist/heart.png
deleted file mode 100644
index d9ee53e59..000000000
Binary files a/customize.dist/heart.png and /dev/null differ
diff --git a/customize.dist/logo-xwiki.png b/customize.dist/logo-xwiki.png
deleted file mode 100644
index 375739d2b..000000000
Binary files a/customize.dist/logo-xwiki.png and /dev/null differ
diff --git a/customize.dist/logo-xwiki2.png b/customize.dist/logo-xwiki2.png
deleted file mode 100644
index 047c89ea7..000000000
Binary files a/customize.dist/logo-xwiki2.png and /dev/null differ
diff --git a/customize.dist/openpaas.png b/customize.dist/openpaas.png
deleted file mode 100644
index aa91bfe98..000000000
Binary files a/customize.dist/openpaas.png and /dev/null differ
diff --git a/customize.dist/openpaasng.png b/customize.dist/openpaasng.png
deleted file mode 100644
index 54168332c..000000000
Binary files a/customize.dist/openpaasng.png and /dev/null differ
diff --git a/rpc.js b/rpc.js
index f108b1ab8..8be2f1df8 100644
--- a/rpc.js
+++ b/rpc.js
@@ -785,6 +785,24 @@ var upload_status = function (Env, publicKey, filesize, cb) {
});
};
+var isAuthenticatedCall = function (call) {
+ return [
+ //'COOKIE',
+ 'RESET',
+ 'PIN',
+ 'UNPIN',
+ 'GET_HASH',
+ 'GET_TOTAL_SIZE',
+ 'GET_FILE_SIZE',
+ 'UPDATE_LIMITS',
+ 'GET_LIMIT',
+ 'GET_MULTIPLE_FILE_SIZE',
+ 'UPLOAD',
+ 'UPLOAD_COMPLETE',
+ 'UPLOAD_CANCEL',
+ ].indexOf(call) !== -1;
+};
+
/*::const ConfigType = require('./config.example.js');*/
RPC.create = function (config /*:typeof(ConfigType)*/, cb /*:(?Error, ?Function)=>void*/) {
// load pin-store...
@@ -840,7 +858,6 @@ RPC.create = function (config /*:typeof(ConfigType)*/, cb /*:(?Error, ?Function)
beginSession(Sessions, publicKey);
var cookie = msg[0];
-
if (!isValidCookie(Sessions, publicKey, cookie)) {
// no cookie is fine if the RPC is to get a cookie
if (msg[1] !== 'COOKIE') {
@@ -854,8 +871,10 @@ RPC.create = function (config /*:typeof(ConfigType)*/, cb /*:(?Error, ?Function)
return void respond('INVALID_MESSAGE_OR_PUBLIC_KEY');
}
- if (checkSignature(serialized, signature, publicKey) !== true) {
- return void respond("INVALID_SIGNATURE_OR_PUBLIC_KEY");
+ if (isAuthenticatedCall(msg[1])) {
+ if (checkSignature(serialized, signature, publicKey) !== true) {
+ return void respond("INVALID_SIGNATURE_OR_PUBLIC_KEY");
+ }
}
var safeKey = escapeKeyCharacters(publicKey);