[wp-trac] [WordPress Trac] #27157: Theme template issue in handling form submission with a specific name in input type text.
WordPress Trac
noreply at wordpress.org
Wed Feb 19 09:26:33 UTC 2014
#27157: Theme template issue in handling form submission with a specific name in
input type text.
--------------------------+-----------------------------
Reporter: abhineet | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 3.8.1
Severity: normal | Keywords:
Focuses: template |
--------------------------+-----------------------------
Hi,
I just noticed that there's a bug in wordpress template handling.
If we create a page & selected custom template in which a form submit is
written & uses 'name' as name in input field then it forces wordpress to
redirect to 404 page instead of template page itself.
{{{
<input class="username" type="text" name="name">
}}}
Step to create this bug:
1) Create a template & write form submit code in it.
{{{
<form name="myForm" method="post" action="<?php echo
$_SERVER["REQUEST_URI"] ?>">
<p>Your Email* :</p>
<input class="email-text-box" type="text" name="email">
<p>Your Name* :</p>
<input class="name-text-box" type="text" name="name"> <!-- Here
name='name' forces wordpress to redirect to 404 page-->
<input name="send" type="submit" value="Send">
</form>
}}}
2) Create a page & set it to this custom template.
3) Goto this page & Submit your value & it'll redirect you to 404 page.
4) Change
{{{
<input class="name-text-box" type="text" name="name">
}}}
to something else let's say
{{{
<input class="name-text-box" type="text" name="testusername">
}}}
Now it'll work properly.
I'm not sure about reserved character, but i googled it & didn't find
anything.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27157>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list