NationalSecurityAgency/ghidra · error · LSHException
Invalid databaseName name
Error message
Invalid databaseName name
What it means
fdbDatabaseDrop compares serverInfo.getDBName() to query.databaseName; a mismatch throws LSHException("Invalid databaseName name"). It is a safety check: you may only drop the database you are currently connected to.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java:3399
ResponseUpdate response = query.updateresponse;
for (ExecutableRecord erec : query.manage.getExecutableRecordSet()) {
int res = updateExecutable(query.manage, erec, response.badfunc);
if (res < 0) {
response.badexe.add(erec);
}
else {
if ((res & 1) != 0) {
response.exeupdate += 1;
}
response.funcupdate += res >> 1;
}
}
}
private void fdbDatabaseDrop(DropDatabase query) throws LSHException {
ResponseDropDatabase response = query.getResponse();
if (!serverInfo.getDBName().equals(query.databaseName)) {
throw new LSHException("Invalid databaseName name");
}
response.dropSuccessful = true; // Response parameters assuming success
response.errorMessage = null;
try {
dropDatabase();
}
catch (ElasticException e) {
response.dropSuccessful = false;
response.errorMessage = e.getMessage();
}
}
/**
* Entry point for the Elasticsearch version of PasswordChange command.
* @param query is command parameters
* @throws LSHException if details of the request are malformed
*/
private void fdbPasswordChange(PasswordChange query) throws LSHException {View on GitHub (pinned to d5f144c24d)
Solutions
- Supply the exact name of the database you are connected to.
- Connect to the target database before issuing DropDatabase.
Example fix
// before req.databaseName = "oldName"; // != connected db // after req.databaseName = db.getServerInfo().getDBName();
Defensive patterns
Strategy: validation
Validate before calling
if (!db.getServerInfo().getDBName().equals(req.databaseName))
throw new IllegalArgumentException("databaseName must match the connected database"); Type guard
boolean nameMatches = db.getServerInfo().getDBName().equals(req.databaseName);
Prevention
- Always source the drop name from the live connection's serverInfo.
- Require explicit confirmation before drop commands.
When it happens
Trigger: Issuing DropDatabase with a databaseName that differs from the connected database's name.
Common situations: Copy-paste of the wrong name; connecting to database A and attempting to drop database B; stale config referencing a renamed database.
Related errors
- Executable
- Expecting privilege option (admin or user)
- host required
- Non-empty dbName required
- Invalid {} dbName: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/91e29ec438c4e5b8.
Report an issue: GitHub.