Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify core skylight controller to trim trailing dot (root DNS) from hos... #8

Merged
merged 1 commit into from
Dec 18, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions application/controllers/skylight.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ function _load_site_config() {
// Load the correct config file - usually looked up using the hostname
$hostname = $_SERVER['HTTP_HOST'];

// Trim the techically-legal but config-breaking trailing dot that a hostname may contain
$hostname = trim($hostname, ".");

// Has a config file been specified using a query string parameter or in the session?
if ($this->config->item('skylight_config_allowoverride') === TRUE) {
$get_config = preg_replace('/[^A-Za-z0-9-_\.]/', '', $this->input->get('config'));
Expand Down