firebase-queue icon indicating copy to clipboard operation
firebase-queue copied to clipboard

Bug in README.md under Queue Security

Open chrisze opened this issue 9 years ago • 1 comments

In README.md, under Queue Security, the validate rule under rules/queue/tasks contains

newData.hasChildren(['_state', '_state_changed', '_progress']) 

Notice the presence of the _progress property. However, in queue_worker.js, in _resetTask, we have:

if (task._state === self.inProgressState) {
  task._state = self.startState;
  task._state_changed = Firebase.ServerValue.TIMESTAMP;
  task._owner = null;
  task._progress = null;
  task._error_details = null;
  return task;
}

So, if the validate rule does contain the _progress property, the transaction in queue_worker will keep failing because _progress is set to null. We should either update the doc or update queue worker.

chrisze avatar Apr 18 '16 03:04 chrisze

Is think that this issue is still applicable: https://github.com/firebase/firebase-queue/blob/master/src/lib/queue_worker.js#L126

Caerbannog avatar Jan 07 '17 12:01 Caerbannog