mirror of
https://github.com/vrana/adminer.git
synced 2025-09-02 10:53:09 +02:00
Fix server URL validation for Oracle connections
Every driver can validate URL host and path by its own rules. Path is forbidden by default, HTTP-based drivers allow only '/' as path and Oracle driver validates path according to the EasyConnect URL format.
This commit is contained in:
@@ -240,6 +240,15 @@ if (isset($_GET["clickhouse"])) {
|
||||
return apply_queries("DROP TABLE", $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $hostPath
|
||||
* @return bool
|
||||
*/
|
||||
function is_server_host_valid($hostPath)
|
||||
{
|
||||
return strpos(rtrim($hostPath, '/'), '/') === false;
|
||||
}
|
||||
|
||||
function connect() {
|
||||
global $adminer;
|
||||
$connection = new Min_DB;
|
||||
|
@@ -273,6 +273,15 @@ if (isset($_GET["elastic5"])) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $hostPath
|
||||
* @return bool
|
||||
*/
|
||||
function is_server_host_valid($hostPath)
|
||||
{
|
||||
return strpos(rtrim($hostPath, '/'), '/') === false;
|
||||
}
|
||||
|
||||
function connect() {
|
||||
$connection = new Min_DB;
|
||||
|
||||
|
@@ -280,7 +280,14 @@ if (isset($_GET["simpledb"])) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $hostPath
|
||||
* @return bool
|
||||
*/
|
||||
function is_server_host_valid($hostPath)
|
||||
{
|
||||
return strpos(rtrim($hostPath, '/'), '/') === false;
|
||||
}
|
||||
|
||||
function connect() {
|
||||
global $adminer;
|
||||
|
Reference in New Issue
Block a user