#54279 closed enhancement (fixed)
Unescaped echo in wp-includes/general-template.php
| Reported by: | sabbirshouvo | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.9 |
| Component: | Login and Registration | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | coding-standards |
Description
In wp-includes/general-template.php -> wp_login_form() there are unescaped value for form name & id that should be properly escaped with esc_attr()
Attachments (2)
Change History (10)
#1
@
5 years ago
- Component General → Login and Registration
- Milestone Awaiting Review → 5.9
- Version trunk
#2
@
5 years ago
@mukesh27 sure it's possible. I'm looking into the codes and will make necessary adjustment to the patch.
#4
@
5 years ago
- Type defect (bug) → enhancement
According to WordPress Coding Standards, the rule here is to escape late, so better not using those variables.
#5
@
5 years ago
I prefer the 54279.diff patch to 54279.3.diff. It escapes late like @audrasjb suggested.
#6
@
5 years ago
- Keywords commit added
Adding commit keyword for 54279.diff which is the best option according to WordPress Coding Standards.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi there, thanks for the ticket and patch!
The patch looks good to me just one thought, For below three variable we used two times
esc_attrcan we assign escape value in single variable and pass it?esc_attr( $args['form_id'] )esc_attr( $args['id_username'] )esc_attr( $args['id_password'] )Moving to milestone
5.9.