Opened 6 years ago
Closed 6 years ago
#50532 closed defect (bug) (duplicate)
Undefined index SERVER_NAME
| Reported by: | malthert | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Version: | 5.5 | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi there, welcome back to WordPress Trac!
Thanks for the report, we're already tracking this issue in #25239.