Make WordPress Core

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: Mail 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)

#1 @SergeyBiryukov
6 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Hi there, welcome back to WordPress Trac!

Thanks for the report, we're already tracking this issue in #25239.

Note: See TracTickets for help on using tickets.