Permalink
Browse files

Require that description be a string if set

  • Loading branch information...
1 parent e5eb478 commit c987fe4a8dcabbce893c55034269d54a48c62ec8 @isaacs isaacs committed Sep 8, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 registry/validate_doc_update.js
@@ -190,6 +190,10 @@ module.exports = function (doc, oldDoc, user, dbCtx) {
"Please update your publish scripts.")
}
+ if (doc.description) {
+ assert(typeof doc.description === 'string',
+ '"description" field must be a string')
+ }
// at this point, we've passed the basic sanity tests.
// Time to dig into more details.

0 comments on commit c987fe4

Please sign in to comment.