Comments (7)
Thank you for your fast response. After following the instructions you gave me, it works flawlessly.
Thank you for mantaining this fork, I've been using it for quite a while now and it is just awesome.
I will close this issue now as the commit will roll out soon.
from lolisafe.
Ah yes, sorry about that.
The main script lolisafe.js
doesn't wait for DB tables to be created first, before proceeding to query the tables (for file identifiers cache and whatnot). And since it exits immediately upon error, the database is never fully initiated.
Meanwhile, try to delete any leftover, and possibly broken anyway, db file with rm database/db
in lolisafe's root dir.
Then you can try to run node
to start node shell, also in lolisafe's root dir, and then execute the commands below through it:
require('./database/db.js')(require('knex')({ client: 'sqlite3', connection: { filename: './database/db' }, useNullAsDefault: true }))
That should properly initiate the sqlite databse with all the required tables and whatnot.
I'll commit a permanent fix in a few hours. Thanks for the report! 👍
from lolisafe.
I have to reopen this as I can't log in to the root account.
I've checked that the default admin details should be as follow:
Username: root
Password: changeme
I am unable to log in with these details. Do I have to initialize the root account somehow?
from lolisafe.
Ah, if your DB was created BEFORE the bug fix commit (that is, through the instructions I sent previously), the default login was username root
& password root
.
But I forgot that a couple weeks ago, I enforced password min length to 6 chars in the auth page, thus preventing new installations from using root
password (cause it's only 4 chars).
So I decided to also change the default password in that bug fix commit to changeme
, but that will only apply to new DB created AFTER the commit.
from lolisafe.
If necessary, you can execute the commands below in node
shell to forcefully update the admin account's password (if starting over with a clean DB is not an option):
db = require('knex')({ client: 'sqlite3', connection: { filename: './database/db' }, useNullAsDefault: true })
require('bcrypt').hash('changeme', 10).then(pass => db.table('users').where('username', 'root').first().update('password', pass))
Make sure to execute the command line by line.
It'll update the password to changeme
.
from lolisafe.
If necessary, you can execute the commands below in
node
shell to forcefully update the admin account's password (if starting over with a clean DB is not an option):db = require('knex')({ client: 'sqlite3', connection: { filename: './database/db' }, useNullAsDefault: true }) require('bcrypt').hash('changeme', 10).then(pass => db.table('users').where('username', 'root').first().update('password', pass))Make sure to execute the command line by line.
It'll update the password tochangeme
.
Thanks for the help, I just logged in changing the minlength value from the password box to 4. This works for logging in although it doesn't for registering, which is the expected scenario.
Feel free to close this issue if everything seems ok to you.
from lolisafe.
Aha, I had the impression that I also forced the min length on the login API, which was why I didn't bother to suggest temporarily editing the input's minlength attribute.
I guess it wouldn't make much sense to force it on the API to begin with, so I'll leave it as it is.
Anyway, good to know it's working for you 👍
from lolisafe.
Related Issues (20)
- Dependency Dashboard
- database from v4 chibisafe is not compatible with this fork
- How to access the API HOT 2
- Cannot access files uploaded to lolisafe HOT 4
- Feature requests?
- Error Code 0. HOT 5
- TypeError: Cannot read properties of undefined (reading 'hasher') HOT 9
- Add more upload size for certain groups. HOT 3
- sqlite3 CXXABI_1.3.8 not found error HOT 4
- Problem with the waveform HOT 4
- Docker Image building error HOT 2
- Are the files supposed to served on both domains? HOT 25
- Make usernames case-sensitive. HOT 1
- Audio and video not downloading/working properly HOT 17
- Reset password HOT 1
- Users get their own folder HOT 1
- Page not loading properly HOT 4
- Promote to superadmin HOT 2
- Chunked uploads fail when coming from IPv6 addresses HOT 2
- Consider using Prettier for formatting CSS/SCSS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lolisafe.