Add default admin credentials and improved initialization logging
This commit is contained in:
parent
6c8f9ceb63
commit
ec05cbb788
4 changed files with 54 additions and 7 deletions
|
|
@ -37,9 +37,16 @@ That's it! 🎉
|
|||
- **Web Interface**: http://localhost:12345
|
||||
- **Update Server**: http://localhost:9000
|
||||
|
||||
### Default Credentials
|
||||
### 🔑 Default Credentials
|
||||
|
||||
On first run, create an admin account through the web interface.
|
||||
On first run, a default admin account is automatically created:
|
||||
|
||||
```
|
||||
Username: admin
|
||||
Password: admin
|
||||
```
|
||||
|
||||
**⚠️ IMPORTANT**: You will be prompted to change this password on first login!
|
||||
|
||||
## 🔧 Configuration Options
|
||||
|
||||
|
|
|
|||
|
|
@ -173,5 +173,9 @@ Your StreamFlow application is now ready for easy deployment! Users will be able
|
|||
1. Download one file (`docker-compose.yml`)
|
||||
2. Run `docker compose up -d`
|
||||
3. Access the application instantly
|
||||
4. Login with default credentials:
|
||||
- **Username**: `admin`
|
||||
- **Password**: `admin`
|
||||
- Change password on first login!
|
||||
|
||||
No complex builds, no dependencies, just pull and run! 🎉
|
||||
|
|
|
|||
21
README.md
21
README.md
|
|
@ -1,6 +1,25 @@
|
|||
# StreamFlow IPTV Application
|
||||
|
||||
A modern, feature-rich IPTV streaming application with secure Docker deployment on port 12345.
|
||||
[](https://hub.docker.com/r/aiulian25/streamflow)
|
||||
[](https://hub.docker.com/r/aiulian25/streamflow)
|
||||
[](LICENSE)
|
||||
|
||||
A modern, feature-rich IPTV streaming application with secure Docker deployment.
|
||||
|
||||
## 🚀 Quick Start (3 Commands)
|
||||
|
||||
```bash
|
||||
# 1. Download docker-compose.yml
|
||||
wget https://raw.githubusercontent.com/aiulian25/streamflow/main/docker-compose.yml
|
||||
|
||||
# 2. Start the application
|
||||
docker compose up -d
|
||||
|
||||
# 3. Access at http://localhost:12345
|
||||
# Login: admin / admin (change on first login!)
|
||||
```
|
||||
|
||||
**That's it!** See [DOCKER_INSTALLATION.md](DOCKER_INSTALLATION.md) for detailed setup.
|
||||
|
||||
## 🆕 Desktop Application Available!
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,14 @@ const initialize = () => {
|
|||
|
||||
// Create default admin user if no users exist
|
||||
db.get("SELECT COUNT(*) as count FROM users", [], (err, result) => {
|
||||
if (!err && result.count === 0) {
|
||||
if (err) {
|
||||
console.error('Error checking user count:', err);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`Database initialized. Current users: ${result.count}`);
|
||||
|
||||
if (result.count === 0) {
|
||||
const bcrypt = require('bcrypt');
|
||||
const defaultPassword = bcrypt.hashSync('admin', 10);
|
||||
|
||||
|
|
@ -172,14 +179,24 @@ const initialize = () => {
|
|||
['admin', 'admin@streamflow.local', defaultPassword, 'admin', 1],
|
||||
(err) => {
|
||||
if (err) {
|
||||
console.error('Failed to create default admin:', err);
|
||||
console.error('❌ Failed to create default admin:', err);
|
||||
} else {
|
||||
// CWE-532: Never log passwords - even default ones
|
||||
console.log('✓ Default admin user created (username: admin)');
|
||||
console.log('⚠ SECURITY: Change the default admin password immediately!');
|
||||
console.log('');
|
||||
console.log('═══════════════════════════════════════════════════════');
|
||||
console.log('✅ Default admin user created successfully!');
|
||||
console.log('');
|
||||
console.log(' Username: admin');
|
||||
console.log(' Password: admin');
|
||||
console.log('');
|
||||
console.log('⚠️ SECURITY WARNING: Change this password immediately!');
|
||||
console.log('═══════════════════════════════════════════════════════');
|
||||
console.log('');
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
console.log('ℹ️ Users already exist. Skipping default admin creation.');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue