games647 / FastLogin

Checks if a minecraft player has a valid paid account. If so, they can skip offline authentication automatically. (premium auto login)
https://www.spigotmc.org/resources/fastlogin.14153
MIT License
494 stars 121 forks source link

Mysql error: Public Key Retrieval is not allowed #433

Closed PinkFloyd1213 closed 2 years ago

PinkFloyd1213 commented 3 years ago

What behaviour is observed:

When I try to use the plugin on my bungeecord server, at launch I get an error, which says "Public Key Retrieval is not allowed".

Steps/models to reproduce:

Set up the plugin on a bungeecord. In the config, configure a Mysql server. The error appears at launch, in the logs.

Plugin list:

Plugins Bungee:

Environment description

Bungeecord 1.12.2

Plugin version or build number:

Build #959

Server Log:

Hastebin link

Configuration:

Hastebin link

games647 commented 3 years ago

Do you checked if the username password combination is correct for your MySQL server?

N4M3L355 commented 3 years ago

Hello, I was having this problem too and I solved it using this solution: https://stackoverflow.com/questions/50379839/connection-java-mysql-public-key-retrieval-is-not-allowed . There is no direct way to tell plugin to allow public ke retrieval, but you can "hack" used connection string — just append the ?allowPublicKeyRetrieval=true&useSSL=false to your database name in Fastlogin/config.yml. (Example: my database name was 'fastlogin' so I changed it to 'fastlogin?allowPublicKeyRetrieval=true&useSSL=false')

jae1911 commented 2 years ago

Got the same thing on a Waterfall server, the hack demonstrated by N4M3L355 works.

Smart123s commented 2 months ago

Hello, I was having this problem too and I solved it using this solution: https://stackoverflow.com/questions/50379839/connection-java-mysql-public-key-retrieval-is-not-allowed . There is no direct way to tell plugin to allow public ke retrieval, but you can "hack" used connection string — just append the ?allowPublicKeyRetrieval=true&useSSL=false to your database name in Fastlogin/config.yml. (Example: my database name was 'fastlogin' so I changed it to 'fastlogin?allowPublicKeyRetrieval=true&useSSL=false')

I came across this issue today, and I thought I'd drop this here.

Note that allowPublicKeyRetrieval=True could allow a malicious proxy to perform a MITM attack to get the plaintext password, so it is False by default and must be explicitly enabled. Source: https://stackoverflow.com/a/50438872/9767089