inabahare / lewd2

A based file uploader
https://lewd.se
GNU General Public License v3.0
23 stars 3 forks source link

"Cannot read property 'isadmin' of undefined" on admin pages when not logged in #22

Closed kattjevfel closed 5 years ago

kattjevfel commented 5 years ago

Shows on all admin pages if accessed by someone not logged in, non-admin user not tested.

.../user/admin/view-users .../user/admin/token .../user/admin/reset-password .../user/admin/remove-files

TypeError: Cannot read property 'isadmin' of undefined
    at router.use (/var/www/lewd2/dist/app.js:2045:23)
    at Layer.handle [as handle_request] (/var/www/lewd2/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/www/lewd2/node_modules/express/lib/router/index.js:317:13)
    at /var/www/lewd2/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/var/www/lewd2/node_modules/express/lib/router/index.js:335:12)
    at next (/var/www/lewd2/node_modules/express/lib/router/index.js:275:10)
    at Function.handle (/var/www/lewd2/node_modules/express/lib/router/index.js:174:3)
    at router (/var/www/lewd2/node_modules/express/lib/router/index.js:47:12)
    at Layer.handle [as handle_request] (/var/www/lewd2/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/www/lewd2/node_modules/express/lib/router/index.js:317:13)
inabahare commented 5 years ago

This should have been fixed as of https://github.com/inabahare/lewd2/commit/3ce72bbb43d631ac82d44fa46bf1365582274354