[Pushed] contact form not stripping html code in emails
#1
Hi,

I use the default mybb contact form. when a user submits a contact form and it emails me, it doesn't strip the <br /> from the email. here's a recent email I was sent from the contact form:

E-mail: [email protected]
Forum profile: username
IP Address: 127.0.0.1
Message:
Hello,<br />
<br />
I just created a profile a few minutes ago and was wondering if i could change my username?<br />
<br />
Will i have to delete and then re-create?<br />
<br />
Thanks!<br />
<br />
Me
Reply
#2
I can't reproduce.

1. Are you using 1.8.5?
2. Do you have any modified core files? If yes, which?
3. What was the exact input you entered in textarea?
Reply
#3
(2015-06-14, 01:55 AM)Destroy666 Wrote: I can't reproduce.

1. Are you using 1.8.5?
2. Do you have any modified core files? If yes, which?
3. What was the exact input you entered in textarea?


1- 1.8.5

2- only to bypass the registration agreement. changes to member.php:

from
if((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) && $fromreg == 0 || $mybb->request_method != "post")

to
if(!isset($mybb->settings['reg_agreement'])  && $mybb->request_method != "post")

3- this is a form someone submitted. I'll test myself and report back.

I did a test contact form..I just hit enter after each word in the message area:

E-mail: [email protected]
Forum profile: andrewjs18
IP Address: 0.0.0.0
Message:
Let's<br />
see<br />
if<br />
I<br />
can<br />
break<br />
this!<br />
<br />
thanks,<br />
<br />
Andrew
Reply
#4
any movement on this?
Reply
#5
this isn't parsing an ampersand either:

E-mail: [email protected]
Forum profile: N/A
IP Address: 0.0.0.0
Message:
Not sure what my usérname is&amp; I need a new password<br />
<br />
<br />
TIA
Reply
#6
The parser does insert these tags indeed (https://github.com/mybb/mybb/blob/featur...t.php#L217).
The characters are escaped too because these e-mails were presumably intended to be sent as HTML, but aren't - the default type is defined as text, not text/html: https://github.com/mybb/mybb/blob/featur...s.php#L527, which could be overridden here: https://github.com/mybb/mybb/blob/featur...t.php#L230.
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz
Reply
#7
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/2107

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Reply
#8
any fix ? http://community.mybb.com/thread-194309.html
Reply
#9
(2016-06-17, 12:03 PM)boson Wrote: any fix ? http://community.mybb.com/thread-194309.html

There has not been a fixed created and tested for this issue yet.
-Ben

Please do not PM me for support. I am looking to be hired for paid services.

You can view my paid services here.
Reply
#10
(2016-06-17, 12:33 PM)Ben C Wrote:
(2016-06-17, 12:03 PM)boson Wrote: any fix ? http://community.mybb.com/thread-194309.html

There has not been a fixed created and tested for this issue yet.

but i need some immediate fix . you got any ? thanks

waiting for this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)