GrdMe / GrdMe-server

Grd Me's server implementation
https://twofish.cs.unc.edu
MIT License
0 stars 0 forks source link

basic_auth with no body on /api/v1/key/initial fails #6

Closed urandom2 closed 1 year ago

urandom2 commented 8 years ago

submit a new request to /api/v1/key/initial with valid pubkey and signature, but no message body generates the following error:

grd.me-server/node_modules/axolotl-crypto/node_modules/axolotl-crypto-curve25519/curve25519.js:1
aughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}))}els
                                                                    ^
TypeError: Cannot read property 'length' of undefined
    at success (/var/express/grd.me-server/app/routes.js:336:38)
    at Function.<anonymous> (/var/express/grd.me-server/app/routes.js:63:29)
    at /var/express/grd.me-server/node_modules/mongoose/lib/model.js:1776:14
    at /var/express/grd.me-server/node_modules/mongoose/node_modules/async/lib/async.js:254:17
    at done (/var/express/grd.me-server/node_modules/mongoose/node_modules/async/lib/async.js:135:19)
    at /var/express/grd.me-server/node_modules/mongoose/node_modules/async/lib/async.js:32:16
    at /var/express/grd.me-server/node_modules/mongoose/node_modules/async/lib/async.js:251:21
    at /var/express/grd.me-server/node_modules/mongoose/node_modules/async/lib/async.js:575:34
    at model.callbackWrapper (/var/express/grd.me-server/node_modules/mongoose/lib/model.js:1749:11)
    at next_ (/var/express/grd.me-server/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:89:34)
    at fnWrapper (/var/express/grd.me-server/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:186:18)
    at /var/express/grd.me-server/node_modules/mongoose/lib/model.js:230:5
    at /var/express/grd.me-server/node_modules/mongoose/lib/model.js:139:7
    at /var/express/grd.me-server/node_modules/mongoose/node_modules/mongodb/lib/collection.js:479:5
    at /var/express/grd.me-server/node_modules/mongoose/node_modules/mongodb/lib/collection.js:633:5
    at /var/express/grd.me-server/node_modules/mongoose/node_modules/mongodb/lib/bulk/unordered.js:469:9

npm ERR! grdme-server@0.0.0 start: `node server.js`
npm ERR! Exit status 7
npm ERR! 
npm ERR! Failed at the grdme-server@0.0.0 start script.
npm ERR! This is most likely a problem with the grdme-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls grdme-server
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.13.0-71-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! cwd /var/express/grd.me-server
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /var/express/grd.me-server/npm-debug.log
npm ERR! not ok code 0

After restarting the nodejs server process, the same request 401s:

Authentication Failed - idkey/did exist in DB
POST /api/v1/key/initial 401 13.009 ms - 10