Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] mysql incorrect password #655

Open
1 task done
lostact opened this issue Oct 9, 2022 · 0 comments
Open
1 task done

[BUG] mysql incorrect password #655

lostact opened this issue Oct 9, 2022 · 0 comments
Assignees
Labels

Comments

@lostact
Copy link

lostact commented Oct 9, 2022

  • I certify that I have read the contributing guidelines and I acknowledge if I don't follow the format below, or I'm using an old version of trojan, or I apparently fail to provide sufficient information (such as logs, specific numbers), or I don't check this box, my issue will be closed immediately without any notice.

Trojan Version
1.16.0

Describe the bug
Trojan server declines requests because of incorrect password when the password is correctly saved in mysql database.

To Reproduce
Create database and insert a user, attempt to connect with the password.

Logs
valid trojan request structure but possibly incorrect password (8fdd806e2faa58d8dd807977987d2f39442b2d0ce0198bd03d8191ab)

Environment
ubuntu

Additional context
users table:

CREATE TABLE `users` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(64) NOT NULL,
  `password` char(56) NOT NULL,
  `quota` bigint NOT NULL DEFAULT '0',
  `download` bigint unsigned NOT NULL DEFAULT '0',
  `upload` bigint unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `password` (`password`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (13,'ali','8fdd806e2faa58d8dd807977987d2f39442b2d0ce0198bd03d8191ab',0,0,0);

my trojan.conf:

    "mysql": {
        "enabled": true,
        "server_addr": "127.0.0.1",
        "server_port": 3306,
        "database": "trojan",
        "username": "trojan",
        "password": "***",
        "key": "",
        "cert": "",
        "ca": ""
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants