Skip to content

Commit

Permalink
Additional Form Trimming
Browse files Browse the repository at this point in the history
Trim leading/trailing whitespaces from the dashboard path.
  • Loading branch information
Matthew-Hsu committed Jul 5, 2015
1 parent a456018 commit a1cf72f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions var/www/assets/php/settings.php
Expand Up @@ -2,6 +2,9 @@
// Double check to see if we actually got the form data from settings.html.
if ($_POST)
{
// Trim leading/trailing whitespaces to help guard against dashboard path errors.
$_POST['DASHBOARD'] = trim($_POST['DASHBOARD']);

// Ensure that the dashboard path ends with the appropriate ' / '.
if (strcmp(substr($_POST['DASHBOARD'], -1), "/") != 0)
{
Expand Down

0 comments on commit a1cf72f

Please sign in to comment.