Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
yflory 5 years ago
commit 26d05920c2

@ -14,7 +14,7 @@
right: 10vw;
bottom: 10vh;
box-sizing: border-box;
z-index: 1000000; //Z file upload table container
z-index: 100000; //Z file upload table container
display: none;
color: darken(@colortheme_drive-bg, 10%);
max-height: 180px;

@ -23,7 +23,7 @@ var sumChannelSizes = function (sizes) {
.reduce(function (a, b) { return a + b; }, 0);
};
// XXX it's possible for this to respond before the server has had a chance
// FIXME it's possible for this to respond before the server has had a chance
// to fetch the limits. Maybe we should respond with an error...
// or wait until we actually know the limits before responding
var getLimit = Pinning.getLimit = function (Env, publicKey, cb) {

@ -81,7 +81,8 @@ Quota.updateCachedLimits = function (Env, cb) {
req.on('error', function (e) {
Quota.applyCustomLimits(Env);
if (!Env.domain) { return cb(); } // XXX
// FIXME this is always falsey. Maybe we just suppress errors?
if (!Env.domain) { return cb(); }
cb(e);
});

@ -232,7 +232,9 @@ RPC.create = function (config, cb) {
myDomain: config.myDomain,
mySubdomain: config.mySubdomain,
customLimits: config.customLimits,
domain: config.domain // XXX
// FIXME this attribute isn't in the default conf
// but it is referenced in Quota
domain: config.domain
};
Env.defaultStorageLimit = typeof(config.defaultStorageLimit) === 'number' && config.defaultStorageLimit > 0?

@ -1123,7 +1123,7 @@ module.exports.create = function (conf, cb) {
// iterate over the messages in a log
readMessagesBin: (channelName, start, asyncMsgHandler, cb) => {
if (!isValidChannelId(channelName)) { return void cb(new Error('EINVAL')); }
// XXX there is a race condition here
// FIXME there is a race condition here
// historyKeeper reads the file to find the byte offset of the first interesting message
// then calls this function again to read from that point.
// If this task is in the queue already when the file is read again
@ -1143,7 +1143,7 @@ module.exports.create = function (conf, cb) {
// remove a channel and its associated metadata log if present
removeChannel: function (channelName, cb) {
if (!isValidChannelId(channelName)) { return void cb(new Error('EINVAL')); }
// XXX there's another race condition here...
// FIXME there's another race condition here...
// when a remove and an append are scheduled in that order
// the remove will delete the channel's metadata (including its validateKey)
// then the append will recreate the channel and insert a message.

Loading…
Cancel
Save