Skip to content

Commit

Permalink
Quick Fix. MAVIS leading and trailing spaces in passwords.
Browse files Browse the repository at this point in the history
  • Loading branch information
gurkin33 committed Apr 11, 2021
1 parent b50b2d3 commit bad1573
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mavis/Controllers/Controller.php
Expand Up @@ -26,9 +26,9 @@ public function __get($property)

public function in($value = '')
{
$tempArray = preg_split("/\s+/", trim($value), 2);
$tempArray = preg_split("/\s/", $value, 2);
if ( count($tempArray) <= 1 ) return false;
$this->V_IN[$tempArray[0]]=trim($tempArray[1]);
$this->V_IN[$tempArray[0]]=str_replace(PHP_EOL, '', $tempArray[1]);
if ($this->debug) {
if ( $tempArray[0] != 8 ) $myfile = file_put_contents('/var/log/tacacsgui/mavis_debug.txt', $value, FILE_APPEND);
else $myfile = file_put_contents('/var/log/tacacsgui/mavis_debug.txt', '8 <password>'."\n", FILE_APPEND);
Expand Down

0 comments on commit bad1573

Please sign in to comment.