mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
Fixed multifactor auth-plugin use on server - thanks to Claudio
This commit is contained in:
parent
8a06045451
commit
47f8bca945
@ -60,7 +60,7 @@ bool_t REMOTE_getbytes (XDR*, SCHAR*, u_int);
|
||||
bool REMOTE_legacy_auth(const char* nm, int protocol);
|
||||
Firebird::RefPtr<Config> REMOTE_get_config(const Firebird::PathName* dbName);
|
||||
void REMOTE_parseList(Remote::ParsedList&, Firebird::PathName);
|
||||
void REMOTE_mergeList(Firebird::PathName& list, const Remote::ParsedList& parsed);
|
||||
void REMOTE_makeList(Firebird::PathName& list, const Remote::ParsedList& parsed);
|
||||
void REMOTE_check_response(Firebird::IStatus* warning, Rdb* rdb, PACKET* packet);
|
||||
|
||||
#define HANDSHAKE_DEBUG(A)
|
||||
|
@ -994,7 +994,7 @@ void REMOTE_parseList(Remote::ParsedList& parsed, Firebird::PathName list)
|
||||
}
|
||||
}
|
||||
|
||||
void REMOTE_mergeList(Firebird::PathName& list, const Remote::ParsedList& parsed)
|
||||
void REMOTE_makeList(Firebird::PathName& list, const Remote::ParsedList& parsed)
|
||||
{
|
||||
list.erase();
|
||||
for (unsigned i = 0; i < parsed.getCount(); ++i)
|
||||
|
@ -6026,13 +6026,22 @@ void SrvAuthBlock::createPluginsItr()
|
||||
}
|
||||
|
||||
// special case - last plugin from the list on the server may be used to check
|
||||
// correctness of what previous one added to auth parameters block
|
||||
if (final[final.getCount() - 1] != onServer[onServer.getCount() - 1])
|
||||
// correctness of what previous plugins added to auth parameters block
|
||||
bool multiFactor = true;
|
||||
for (unsigned sp = 0; sp < final.getCount(); ++sp)
|
||||
{
|
||||
if (final[sp] == onServer[onServer.getCount() - 1])
|
||||
{
|
||||
multiFactor = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (multiFactor)
|
||||
{
|
||||
final.push(onServer[onServer.getCount() - 1]);
|
||||
}
|
||||
|
||||
REMOTE_mergeList(pluginList, final);
|
||||
REMOTE_makeList(pluginList, final);
|
||||
|
||||
plugins = new AuthServerPlugins(PluginType::AuthServer, FB_AUTH_SERVER_VERSION, upInfo,
|
||||
myConfig, pluginList.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user