Skip to content

Commit

Permalink
allow @ in database names
Browse files Browse the repository at this point in the history
  • Loading branch information
ximex committed Dec 29, 2018
1 parent 646f4e1 commit 11b7d43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
$ipv4Regex = '(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';
$ipv6Regex = '(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}';
$hostRegex = '^(' . $hostnameRegex . '|' . $ipv4Regex . '|' . $ipv6Regex . ')$';
$sqlIdentifiersRegex = '^[a-zA-Z0-9_$-]+$';
$sqlIdentifiersRegex = '^[a-zA-Z0-9_$@-]+$';

// initialize form data
if (isset($_SESSION['db_host']))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
if (isset($_POST['db_host']))
{
// PHP-Check Regex-Patterns
$sqlIdentifiersRegex = '/^[a-zA-Z0-9_$-]+$/';
$sqlIdentifiersRegex = '/^[a-zA-Z0-9_$@-]+$/';

// Zugangsdaten der DB in Sessionvariablen gefiltert speichern
$_SESSION['db_engine'] = $_POST['db_engine'];
Expand Down

0 comments on commit 11b7d43

Please sign in to comment.