Can not login to NodeBB. Login or password wrong
-
If you want to create indices you can run these in mongo cli.
db.objects.createIndex({ _key: 1, score: -1 }); db.objects.createIndex({ _key: 1, value: -1 }, { unique: true, sparse: true }); db.objects.createIndex({ expireAt: 1 }, { expireAfterSeconds: 0 });
-
@baris I got error when I tried your commands:
admin> use nodebb switched to db nodebb nodebb> db.objects.getIndexes() [ { v: 2, key: { _id: 1 }, name: '_id_' } ] nodebb> db.objects.createIndex({ _key: 1, score: -1 }); _key_1_score_-1 nodebb> db.objects.createIndex({ _key: 1, value: -1 }, { unique: true, sparse: true }); MongoServerError: Index build failed: 1374ccee-594f-4a6e-8561-881742cbb123: Collection nodebb.objects ( 2a93f794-19b8-444c-82e5-90190d386264 ) :: caused by :: E11000 duplicate key error collection: nodebb.objects index: _key_1_value_-1 dup key: { _key: "analyticsKeys", value: "uniquevisitors" } nodebb> db.objects.createIndex({ expireAt: 1 }, { expireAfterSeconds: 0 }); expireAt_1 nodebb> db.objects.getIndexes() [ { v: 2, key: { _id: 1 }, name: '_id_' }, { v: 2, key: { _key: 1, score: -1 }, name: '_key_1_score_-1' }, { v: 2, key: { expireAt: 1 }, name: 'expireAt_1', expireAfterSeconds: 0 } ] nodebb>
Is it ok?
-
For my original problem, I think I found a bug.
For some reason the user password length was set to 0 (I didn't set it that way, it's not possible). When I set up my forum, my password was 7 characters long (before launching the site, I change the password to a complex and unique one, but during the development process I use a simple one that I remember). When I transferred the forum to the server and edited Users -> Settings, I set the minimum password to 8 characters, because it was impossible to leave the field with a default value of 0. And here I see a bug, because no one expects this behavior. Once the minimum password is set, NodeBB simply stops accepting any passwords that are shorter. This is completely non-obvious and as an admin I fell into a trap. I would expect two behaviors:- Continue to accept set passwords even of shorter length until a password change is required
- Display a warning and reset passwords of shorter length if the administrator confirms this action.