Error reconnecting to DB COMPROMISES Database Host.
-
Hello!
I found with what I consider a big security issue today.
I developed a medium sized website with WordPress and today I’ve started to have issues with POST petitions to the wp-cron.php. I searched for this issue and have since fixed it.
The problem is that I got reports that at certain points (while my site was heavily down) , users got a screen with the error “Error reconnecting to the database” AND below that, a small paragraph where it explicitily writes the name of my database host.
This is the code that I found where it adds the database host:
$message = ‘<h1>’ . __( ‘Error reconnecting to the database’ ) . “</h1>\n”;
$message .= ‘<p>’ . sprintf(
/* translators: %s: Database host. */
__( ‘This means that we lost contact with the database server at %s. This could mean your host’s database server is down.’ ),
‘' . htmlspecgialchars( $this->dbhost, ENT_QUOTES ) . '
‘
) . “</p>\n”;This is terrible in my opinion since now I have to go and rename my database instance , since I find the database host a sensitive parameter. I am actually quite worried right now and I want to know how can I make it so this never happens again? I understand that websites can sometimes go down, but I dont want my database host info printed on anybodys screen! As a matter of fact, Im wondering if the problem of the POSTs at the wp-cron.php were made for this exact purpose, to extract my database host? Again, I am very worried.
Please let me know if there is a way as to make this never happen again. Any help would be greatly appreciated
- The topic ‘Error reconnecting to DB COMPROMISES Database Host.’ is closed to new replies.