DevLeoko / AdvancedBan

AdvancedBan is a Spigot plugin to manage punishments on single servers and server networks
GNU General Public License v3.0
156 stars 128 forks source link

Can't use special characters on MYSQL (password) #603

Closed JoeDalton9027 closed 1 year ago

JoeDalton9027 commented 1 year ago

What version of AdvancedBan (/AdvancedBan) are you using? latest

What kind of server do you have (Bungeecord/single server)? Paper 1.19.3 - build 381

What server version (/version) are you using? 1.19.3

Please provide the EXACT steps required to reproduce the problem...

  1. Set UseMySQL: true
  2. Entering database informations
  3. When using a " # " character into my password, the plugin can't connect to database, but, when special character is not set, plugin can connect to database, ths issue comes when the password contain special character. latest.log

Any error/log post it through pastebin.com and link it here. (Also include /plugins/AdvancedBan/logs/latest.log)

the issue, displays the same thing that is into " latest.log " file

Add any additional information below.

Please, is there any way to use special char? latest.log

Hopefuls commented 1 year ago

the issue seems to be more related to your password being incorrect

but, when special character is not set, plugin can connect to database

which I assume you're referring to it connecting to your database correct?

JoeDalton9027 commented 1 year ago

Hello I'm 100% sure database information is correct.

The plugin just don't support special chars.

Le dim. 22 janv. 2023, 01:35, Aurel Ballin @.***> a écrit :

the issue seems to be more related to your password being incorrect

but, when special character is not set, plugin can connect to database

which I assume you're referring to it connecting to your database correct?

— Reply to this email directly, view it on GitHub https://github.com/DevLeoko/AdvancedBan/issues/603#issuecomment-1399366527, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HVDB4CWUXRZJ5DQDDS3G3WTR6DZANCNFSM6AAAAAAUCQDPG4 . You are receiving this because you authored the thread.Message ID: @.***>

Hopefuls commented 1 year ago

I was unable to reproduce your issue with a password with the following text: A-Password!!!With###Hashtags

The plugin normally connected to the database with no errors.

Relevant configuration section, this was the only thing I have changed on AdvancedBan:

# If set to false all bans will be saved locally in a HSQLDB-Database
UseMySQL: true

MySQL:
  IP: localhost
  DB-Name: AdvancedBan
  Username: root
  Password: A-Password!!!With###Hashtags
  Port: 3306
  Properties: 'verifyServerCertificate=false&useSSL=false&useUnicode=true&characterEncoding=utf8'

Tested on spigot 1.19 on a linux virtual machine, using the latest version of AdvancedBan, which is 2.3.0.

The error you have provided is telling me that whatever password you have provided, is incorrect. I am still unsure what you're referring to with "but, when special character is not set, plugin can connect to database". This sounds like to me as if you're trying to add a # to your password, but that being the incorrect one as you have not changed it on your database-side.

gamer50082 commented 1 year ago

can be reproduce

gamer50082 commented 1 year ago

maybe try another password

Hopefuls commented 1 year ago

If i actually use a password that is incorrect, by just adding a # to the password field, then it is intentional that it does not work, as the password does not match.

@JoeDalton9027 check if you're able to connect with the # based password through tools such as heidisql.

Hopefuls commented 1 year ago

I am getting the exact same nature of error when providing a wrong password, as indicated by the exception message of java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

image

JoeDalton9027 commented 1 year ago

So how could you explain this ?

First screen is database informations Second, plugin config.yml

Screenshot_2 Screenshot_3

JoeDalton9027 commented 1 year ago

After checking informations, reload the server, then, got this. latest.log

Hopefuls commented 1 year ago

The way YAML is reading that is as a comment due to the starting # on your password. You can read more about the YAML Usage regarding comments here.

This is not a bug, but intentional behaviour by the YAML Language. In order to have the plugin correctly read it, encase it with quotation marks.

Example:

MySQL:
 ...
 Password: "#bbMIX570"

This should then allow AdvancedBan to correctly parse the YML file and get the password to use to connect with your Database.

Hopefuls commented 1 year ago

After checking informations, reload the server, then, got this. latest.log

This error is caused by the database still being disconnected on reload. A server restart is required to apply database credentials-related changes.

JoeDalton9027 commented 1 year ago

I will try thanks 😉

Le dim. 22 janv. 2023, 17:26, Aurel Ballin @.***> a écrit :

After checking informations, reload the server, then, got this. latest.log https://github.com/DevLeoko/AdvancedBan/files/10474756/latest.log

This error is caused by the database still being disconnected on reload. A server restart is required to apply database credentials-related changes.

— Reply to this email directly, view it on GitHub https://github.com/DevLeoko/AdvancedBan/issues/603#issuecomment-1399536102, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HVDB4PCLKR3RIR7UZWFETWTVNTRANCNFSM6AAAAAAUCQDPG4 . You are receiving this because you were mentioned.Message ID: @.***>

JoeDalton9027 commented 1 year ago

It works like this, thank you for help !