script-lab-2017 icon indicating copy to clipboard operation
script-lab-2017 copied to clipboard

Fix error-handling logic in server.ts (bubble up failures on /open/ route)

Open Zlatkovsky opened this issue 8 years ago • 0 comments

https://github.com/OfficeDev/script-lab/blob/master/src/server/server.ts

Right now, the "zip.on" and other functionality is not exposed as a promise (breaks promise chain), and also does a throw instead of a reject (breaks promise chain)

While we're at it, also add validation for id and type to be alphanumeric+hypthen. Could also sanitize resulting filename to similar as we do with snippet ids.

Also while we're at it, use true guid instead of timestamp for temp file.

Zlatkovsky avatar Sep 28 '17 22:09 Zlatkovsky