mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 23:23:02 +01:00
Fixed bug #8156 : Can not specify concrete IPv6 address in ES/EDS connection string.
This commit is contained in:
parent
363f028204
commit
6578a9282f
@ -115,6 +115,9 @@ Manager::~Manager()
|
|||||||
|
|
||||||
void Manager::addProvider(Provider* provider)
|
void Manager::addProvider(Provider* provider)
|
||||||
{
|
{
|
||||||
|
// TODO: if\when usage of user providers will be implemented,
|
||||||
|
// need to check provider name for allowed chars (file system rules ?)
|
||||||
|
|
||||||
for (const Provider* prv = m_providers; prv; prv = prv->m_next)
|
for (const Provider* prv = m_providers; prv; prv = prv->m_next)
|
||||||
{
|
{
|
||||||
if (prv->m_name == provider->m_name) {
|
if (prv->m_name == provider->m_name) {
|
||||||
@ -155,6 +158,15 @@ static void splitDataSourceName(thread_db* tdbb, const string& dataSource,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
FB_SIZE_T pos = dataSource.find("::");
|
FB_SIZE_T pos = dataSource.find("::");
|
||||||
|
|
||||||
|
// Check if it is part of IPv6 address, assume provider name can't contain square brackets
|
||||||
|
if (pos != string::npos &&
|
||||||
|
dataSource.rfind("[", pos) != string::npos &&
|
||||||
|
dataSource.find("]", pos) != string::npos)
|
||||||
|
{
|
||||||
|
pos = string::npos;
|
||||||
|
}
|
||||||
|
|
||||||
if (pos != string::npos)
|
if (pos != string::npos)
|
||||||
{
|
{
|
||||||
prvName = dataSource.substr(0, pos);
|
prvName = dataSource.substr(0, pos);
|
||||||
|
Loading…
Reference in New Issue
Block a user