Compare commits

...

3 Commits

Author SHA1 Message Date
Arthur Passos
feeb7f82b5
Merge 139e2d4b1e into 40c7d5fd1a 2024-11-20 17:32:08 -03:00
Arthur Passos
139e2d4b1e not so naive 2024-11-12 14:06:31 -03:00
Arthur Passos
6ca3c14acf minor exception message change 2024-11-11 16:51:13 -03:00

View File

@ -268,6 +268,13 @@ namespace
authentication_methods.push_back(ast_authentication_data);
}
// if the first authentication method parsed is of type no_password, then we should not try to parse any further
// as it cannot co-exist with other authentication types
if (authentication_methods.back()->type && authentication_methods.back()->type.value() == AuthenticationType::NO_PASSWORD)
{
return true;
}
// Need to save current position, process comma and only update real position in case there is an authentication method after
// the comma. Otherwise, position should not be changed as it needs to be processed by other parsers and possibly throw error
// on trailing comma.
@ -276,7 +283,7 @@ namespace
{
std::shared_ptr<ASTAuthenticationData> ast_authentication_data;
if (!parseAuthenticationData(aux_pos, expected, ast_authentication_data, false, true, should_parse_no_password))
if (!parseAuthenticationData(aux_pos, expected, ast_authentication_data, false, true, false))
{
break;
}
@ -285,7 +292,7 @@ namespace
authentication_methods.push_back(ast_authentication_data);
}
return !authentication_methods.empty();
return true;
});
}