Opened 7 weeks ago
Last modified 7 weeks ago
#63188 new defect (bug)
Getting Header "REMOTE_ADDR" is user-controlled and should be properly validated before use errors into the core files.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | needs-testing 2nd-opinion changes-requested |
Focuses: | coding-standards | Cc: |
Description
Hello Team,
I have checked wp-admin WordPress core files and I have found this "Header "REMOTE_ADDR" is user-controlled and should be properly validated before use" error for few files. I think that it should be resolve.
Here, I have listed files:
src/wp-includes/class-wp-application-passwords.php
src/wp-includes/class-wp-session-tokens.php
src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
src/wp-includes/user.php
I have tested this into the WordPress 6.8-beta1.
Thanks,
Attachments (2)
Change History (6)
#1
@
7 weeks ago
- Keywords dev-feedback removed
Hello, thanks for the ticket and patch,
Some thoughts:
- there is a wrong
$remore_addr
var name - I think the inline comments are unnecessary
- I'm wondering whether we really need to validate these values since it appears they are never used directly. By the way, even if there is no security threat, it's better if we follow our own best practices. So I'm inclined to say "yes" :)
#3
@
7 weeks ago
Hello @audrasjb
Thank you so much for your feedback.
I will update my patch and change the variable name with appropriate name.
Thanks,
Note: See
TracTickets for help on using
tickets.
I have checked above mentioned issue and founds few files. Here, I have added its patch.