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] Players can log in without a password when the connection to the database fails #110

Open
comendantmc opened this issue Jul 15, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@comendantmc
Copy link

Describe the bug
Players can log in without a password when the connection to the database fails

To Reproduce
Steps to reproduce the behavior:

  1. Set database type to mysql
  2. Set invalid user and passoword

Expected behavior
Players must not be allowed to join. This is a huge security consern

Server Info (please complete the following information):
Everything latest, downloaded today (15.07.2023)

Additional context

[15:33:19 ERROR]: Couldn't pass ProxyInitializeEvent to limboauth
net.elytrium.commons.utils.reflection.ReflectionException: An unexpected internal error was caught during the reflection operations.
        at net.elytrium.limboauth.LimboAuth.reload(LimboAuth.java:310) ~[?:?]
        at net.elytrium.limboauth.LimboAuth.onProxyInitialization(LimboAuth.java:208) ~[?:?]
        at net.elytrium.limboauth.Lmbda$6.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56) ~[velocity-3.2.0-SNAPSHOT-260.jar:3.2.0-SNAPSHOT (git-37fedf50-b260)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:597) ~[velocity-3.2.0-SNAPSHOT-260.jar:3.2.0-SNAPSHOT (git-37fedf50-b260)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:478) ~[velocity-3.2.0-SNAPSHOT-260.jar:3.2.0-SNAPSHOT (git-37fedf50-b260)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.reflect.InvocationTargetException
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.fromDriver(DatabaseLibrary.java:156) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.lambda$static$4(DatabaseLibrary.java:71) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.connect(DatabaseLibrary.java:115) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.connectToORM(DatabaseLibrary.java:131) ~[?:?]
        at net.elytrium.limboauth.LimboAuth.reload(LimboAuth.java:302) ~[?:?]
        ... 8 more
Caused by: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:111) ~[?:?]
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:98) ~[?:?]
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:90) ~[?:?]
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:64) ~[?:?]
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:74) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:895) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:820) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:446) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:239) ~[?:?]
        at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:188) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.fromDriver(DatabaseLibrary.java:156) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.lambda$static$4(DatabaseLibrary.java:71) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.connect(DatabaseLibrary.java:115) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.connectToORM(DatabaseLibrary.java:131) ~[?:?]
        at net.elytrium.limboauth.LimboAuth.reload(LimboAuth.java:302) ~[?:?]
        ... 8 more
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:62) ~[?:?]
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) ~[?:?]
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:150) ~[?:?]
        at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:166) ~[?:?]
        at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89) ~[?:?]
        at com.mysql.cj.NativeSession.connect(NativeSession.java:121) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:839) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:820) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:446) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:239) ~[?:?]
        at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:188) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.fromDriver(DatabaseLibrary.java:156) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.lambda$static$4(DatabaseLibrary.java:71) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.connect(DatabaseLibrary.java:115) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.connectToORM(DatabaseLibrary.java:131) ~[?:?]
        at net.elytrium.limboauth.LimboAuth.reload(LimboAuth.java:302) ~[?:?]
        ... 8 more
Caused by: java.net.ConnectException: Connection refused
        at sun.nio.ch.Net.connect0(Native Method) ~[?:?]
        at sun.nio.ch.Net.connect(Net.java:579) ~[?:?]
        at sun.nio.ch.Net.connect(Net.java:568) ~[?:?]
        at sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:588) ~[?:?]
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[?:?]
        at java.net.Socket.connect(Socket.java:633) ~[?:?]
        at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:153) ~[?:?]
        at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63) ~[?:?]
        at com.mysql.cj.NativeSession.connect(NativeSession.java:121) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:839) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:820) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:446) ~[?:?]
        at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:239) ~[?:?]
        at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:188) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.fromDriver(DatabaseLibrary.java:156) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.lambda$static$4(DatabaseLibrary.java:71) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.connect(DatabaseLibrary.java:115) ~[?:?]
        at net.elytrium.limboauth.dependencies.DatabaseLibrary.connectToORM(DatabaseLibrary.java:131) ~[?:?]
        at net.elytrium.limboauth.LimboAuth.reload(LimboAuth.java:302) ~[?:?]
@comendantmc comendantmc added the bug Something isn't working label Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant