NamelessMC / Nameless

NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range of features.
https://namelessmc.com/
MIT License
611 stars 311 forks source link

Quotes in email/db password break config file #2933

Closed tadhgboyle closed 2 years ago

tadhgboyle commented 2 years ago

Describe the issue

For example:

'password' => ",9nav\G8j:@,Wf7CFQ7-?|vNIQ>_OHo$Y&b+~6rq[\."gvz'54M%Elh%'|I[*9]>",

The " before gvz makes PHP think the password ends there. This can be solved by using addslashes and stripslashes when writing/reading their password from the config file.

NamelessMC Version

2.0.0-pr13

To Reproduce

No response

Expected Behaviour

No response

Screenshots

No response

Additional Information

No response

Derkades commented 2 years ago

stripslashes shouldn't be necessary when reading, when PHP parses the file the extra escape slashes won't end up in the resulting variables