NodeBB / nodebb-plugin-2factor

Two-Factor Authentication for NodeBB
MIT License
12 stars 15 forks source link

error in clearSession #16

Closed barisusakli closed 8 years ago

barisusakli commented 8 years ago
11/8 18:14 [29190] - error: [plugins] Error executing 'static:user.loggedOut' in plugin 'nodebb-plugin-2factor'
11/8 18:14 [29190] - error:  TypeError: Cannot convert undefined or null to object
    at Object.plugin.clearSession [as method] (/home/nodebb/community.nodebb.org/node_modules/nodebb-plugin-2factor/library.js:191:17)
    at /home/nodebb/community.nodebb.org/src/plugins/hooks.js:156:14
    at /home/nodebb/community.nodebb.org/node_modules/async/lib/async.js:181:20
    at Object.async.forEachOf.async.eachOf (/home/nodebb/community.nodebb.org/node_modules/async/lib/async.js:233:13)
    at Object.async.forEach.async.each (/home/nodebb/community.nodebb.org/node_modules/async/lib/async.js:209:22)
    at fireStaticHook (/home/nodebb/community.nodebb.org/src/plugins/hooks.js:145:9)
    at Object.Plugins.fireHook (/home/nodebb/community.nodebb.org/src/plugins/hooks.js:91:5)
    at /home/nodebb/community.nodebb.org/src/controllers/authentication.js:392:12
    at /home/nodebb/community.nodebb.org/node_modules/async/lib/async.js:726:13
    at /home/nodebb/community.nodebb.org/node_modules/async/lib/async.js:52:16
    at done (/home/nodebb/community.nodebb.org/node_modules/async/lib/async.js:246:17)
    at /home/nodebb/community.nodebb.org/node_modules/async/lib/async.js:44:16
    at /home/nodebb/community.nodebb.org/node_modules/async/lib/async.js:723:17
    at /home/nodebb/community.nodebb.org/node_modules/async/lib/async.js:167:37
    at done (/home/nodebb/community.nodebb.org/src/database/mongo/sorted.js:65:4)
    at handleCallback (/home/nodebb/community.nodebb.org/node_modules/mongodb/lib/utils.js:96:12)
3ldor commented 8 years ago

Experiencing the same bug on both an old install and a fresh one. Seems to affect at least NodeBB v1.1.2 and v1.1.0 using MongoDB 2.6.10 as database.