Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wordpress mySQLinsertion vunribility in wp-mail.php
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Jaminadi
n00b
n00b


Joined: 24 Nov 2004
Posts: 24
Location: Boise, ID

PostPosted: Wed Oct 19, 2005 4:20 pm    Post subject: Wordpress mySQLinsertion vunribility in wp-mail.php Reply with quote

Okay, this is a major concern for anyone with 'posting by email enabled' in Wordpress.
The warned you that giving out your address is a problem because other people can post to your blog. That isn't all there is.

In at least my current version of wordpress (1.5.2), the wp-mail.php page does not sanatize the input received and this leaves your database open the sqlInsertion. Because of the anyone can figure out how a wordpress data base is organized, hackers could add themselves, remove you, or perform any other data base function.

Also, this has the unfortunate side effect of preventing emails containing certain punctuation from being put into the data base(think quotations) and thuse never getting out of your pop3 box until you delete them.

If this hasn't already been addressed in more recent versions, it needs to be.

~Joshua
_________________
A woman is as a sword laid aside or a fire at a distance. THe one does not burn, the other does not cut those that approach not neigh unto them.
Back to top
View user's profile Send private message
Jaminadi
n00b
n00b


Joined: 24 Nov 2004
Posts: 24
Location: Boise, ID

PostPosted: Sat Oct 22, 2005 8:09 am    Post subject: Fixed Reply with quote

I have fixed this vunrebility and the error in my home version. Here is how it was done.
The fix is actually quite simple.
Before sending the strings to the database, simply enclose them in a mysql_real_escape_string() php function. This will remove the possiblity of sql-insertion and other problems. I have already implemented it on mine, the changes are so minmal I have not created a diff or listed the code directly. (added the function on the outside right hand of the last $subject and $contend lines).
Does anyore else have the time or know how on how to fix the emerge to automaticly apply a patch. This is an update that should be included in the next release of wordpress, at least to gentoo users until they adopt the changes at the source.
Have a great day.
_________________
A woman is as a sword laid aside or a fire at a distance. THe one does not burn, the other does not cut those that approach not neigh unto them.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum