Opened 4 years ago
Closed 4 years ago
#50532 closed defect (bug) (duplicate)
Undefined index SERVER_NAME
Reported by: | malthert | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.5 |
Component: | Keywords: | ||
Focuses: | Cc: |
Description
wp-includes/pluggable.php
<?php $sitename = strtolower( $_SERVER['SERVER_NAME'] );
1) this requires an !empty check to avoid a notice
2) I suggest to change this to HTTP_HOST as this is more commonly correct (if not set) than SERVER_NAME (maybe fallback to SERVER_NAME)
3) this must be properly sanitized
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hi there, welcome back to WordPress Trac!
Thanks for the report, we're already tracking this issue in #25239.